[
 {
  "id": "C01",
  "http_status": 200,
  "recorded_at": "2026-11-03T23:28:14+00:00",
  "ms": 0,
  "reply": {
   "slug": "taloscode-review",
   "title": "Code review with metrics, issues and an A-F grade",
   "status": "ok",
   "input": "import os, sys, json\n\ndef process(items, flag, mode, extra, verbose, debug):\n    result = []\n    for i in range(len(items)):\n        if flag == True:\n            if mode == \"a\":\n                if items[i] > 10:\n                    if verbose:\n                        print(\"big\", items[i])\n                    result.append(items[i] * 2)\n                else:\n                    result.append(items[i])\n            else:\n                result.append(items[i] + 1)\n    return result\n\ndef unused_helper():\n    x = 1\n    return x\n",
   "total_ms": 95,
   "steps": [
    {
     "call": "POST /analyze",
     "request": {
      "source_code": "import os, sys, json\n\ndef process(items, flag, mode, extra, verbose, debug):\n    result = []\n    for i in range(len(items)):\n        if flag == True:\n            if mode == \"a\":\n                if items[i] > 10:\n                    if verbose:\n                        print(\"big\", items[i])\n                    result.append(items[i] * 2)\n                else:\n                    result.append(items[i])\n            else:\n                result.append(items[i] + 1)\n    return result\n\ndef unused_helper():\n    x = 1\n    return x\n",
      "filename": "process.py"
     },
     "status": 200,
     "ms": 81,
     "reply": {
      "filename": "process.py",
      "metrics": {
       "lines_of_code": 18,
       "total_lines": 20,
       "comment_ratio": 0.0,
       "cyclomatic_complexity": 6,
       "cognitive_complexity": 22,
       "max_nesting_depth": 6,
       "function_count": 2,
       "avg_function_length": 8.5
      },
      "issues": [
       {
        "type": "LONG_PARAM_LIST",
        "line": 3,
        "description": "Function 'process' has 6 parameters (limit: 5). Consider grouping related parameters into a dataclass or config object.",
        "severity": "MEDIUM"
       },
       {
        "type": "DEEP_NESTING",
        "line": 9,
        "description": "Nesting depth 5 in function 'process' exceeds limit of 4. Consider extracting blocks into helper functions.",
        "severity": "MEDIUM"
       },
       {
        "type": "MISSING_DOCSTRING",
        "line": 3,
        "description": "Function 'process' at line 3 has no docstring.",
        "severity": "LOW"
       },
       {
        "type": "MC_NUMBER",
        "line": 8,
        "description": "Magic number 10 at line 8. Give it a meaningful name via a named constant.",
        "severity": "LOW"
       },
       {
        "type": "MC_NUMBER",
        "line": 11,
        "description": "Magic number 2 at line 11. Give it a meaningful name via a named constant.",
        "severity": "LOW"
       },
       {
        "type": "MISSING_DOCSTRING",
        "line": 18,
        "description": "Function 'unused_helper' at line 18 has no docstring.",
        "severity": "LOW"
       }
      ],
      "total_issues": 6,
      "grade": "B"
     }
    }
   ],
   "note": "Real calls to the running service with the public demo identity; replies are unedited."
  }
 },
 {
  "id": "C02",
  "http_status": 200,
  "recorded_at": "2026-11-03T23:28:15+00:00",
  "ms": 0,
  "reply": {
   "slug": "taloscode-review",
   "title": "Code review with metrics, issues and an A-F grade",
   "status": "ok",
   "input": "import os, sys, json\n\ndef process(items, flag, mode, extra, verbose, debug):\n    result = []\n    for i in range(len(items)):\n        if flag == True:\n            if mode == \"a\":\n                if items[i] > 10:\n                    if verbose:\n                        print(\"big\", items[i])\n                    result.append(items[i] * 2)\n                else:\n                    result.append(items[i])\n            else:\n                result.append(items[i] + 1)\n    return result\n\ndef unused_helper():\n    x = 1\n    return x\n",
   "total_ms": 95,
   "steps": [
    {
     "call": "POST /analyze",
     "request": {
      "source_code": "import os, sys, json\n\ndef process(items, flag, mode, extra, verbose, debug):\n    result = []\n    for i in range(len(items)):\n        if flag == True:\n            if mode == \"a\":\n                if items[i] > 10:\n                    if verbose:\n                        print(\"big\", items[i])\n                    result.append(items[i] * 2)\n                else:\n                    result.append(items[i])\n            else:\n                result.append(items[i] + 1)\n    return result\n\ndef unused_helper():\n    x = 1\n    return x\n",
      "filename": "process.py"
     },
     "status": 200,
     "ms": 81,
     "reply": {
      "filename": "process.py",
      "metrics": {
       "lines_of_code": 18,
       "total_lines": 20,
       "comment_ratio": 0.0,
       "cyclomatic_complexity": 6,
       "cognitive_complexity": 22,
       "max_nesting_depth": 6,
       "function_count": 2,
       "avg_function_length": 8.5
      },
      "issues": [
       {
        "type": "LONG_PARAM_LIST",
        "line": 3,
        "description": "Function 'process' has 6 parameters (limit: 5). Consider grouping related parameters into a dataclass or config object.",
        "severity": "MEDIUM"
       },
       {
        "type": "DEEP_NESTING",
        "line": 9,
        "description": "Nesting depth 5 in function 'process' exceeds limit of 4. Consider extracting blocks into helper functions.",
        "severity": "MEDIUM"
       },
       {
        "type": "MISSING_DOCSTRING",
        "line": 3,
        "description": "Function 'process' at line 3 has no docstring.",
        "severity": "LOW"
       },
       {
        "type": "MC_NUMBER",
        "line": 8,
        "description": "Magic number 10 at line 8. Give it a meaningful name via a named constant.",
        "severity": "LOW"
       },
       {
        "type": "MC_NUMBER",
        "line": 11,
        "description": "Magic number 2 at line 11. Give it a meaningful name via a named constant.",
        "severity": "LOW"
       },
       {
        "type": "MISSING_DOCSTRING",
        "line": 18,
        "description": "Function 'unused_helper' at line 18 has no docstring.",
        "severity": "LOW"
       }
      ],
      "total_issues": 6,
      "grade": "B"
     }
    }
   ],
   "note": "Real calls to the running service with the public demo identity; replies are unedited."
  }
 }
]