{
  "metadata": {
    "report_type": "QWED_COMPREHENSIVE_AUDIT",
    "generated_at": "2025-12-01T09:56:32.175345",
    "version": "1.0"
  },
  "summary": {
    "timestamp": "2025-12-01T09:56:32.174330",
    "duration_seconds": 2.47362,
    "total_tests": 9,
    "passed": 8,
    "failed": 1,
    "pass_rate": 88.88888888888889,
    "by_priority": {
      "critical": {
        "total": 3,
        "passed": 3,
        "pass_rate": 100.0
      },
      "high": {
        "total": 5,
        "passed": 4,
        "pass_rate": 80.0
      },
      "medium": {
        "total": 1,
        "passed": 1,
        "pass_rate": 100.0
      }
    },
    "by_engine": {
      "math": {
        "total": 9,
        "passed": 8,
        "pass_rate": 88.88888888888889
      }
    }
  },
  "results": [
    {
      "test_id": "MATH_AMB_001",
      "test_name": "Detect order of operations ambiguity",
      "engine": "math",
      "priority": "HIGH",
      "passed": false,
      "expected_result": "WARNING - Ambiguous (16 vs 1)",
      "actual_result": {
        "status": "ERROR",
        "error": "'Integer' object is not callable",
        "is_valid": false
      },
      "error": null,
      "latency_ms": 140.6238079071045,
      "timestamp": "2025-12-01T09:56:29.840340"
    },
    {
      "test_id": "MATH_AMB_002",
      "test_name": "Handle implicit multiplication (2x vs 2*x)",
      "engine": "math",
      "priority": "MEDIUM",
      "passed": true,
      "expected_result": "Both expressions parse successfully",
      "actual_result": {
        "expr1": {
          "status": "ERROR",
          "error": "invalid syntax (<string>, line 1)",
          "is_valid": false
        },
        "expr2": {
          "is_valid": true,
          "simplified": "2*x + 3",
          "original": "2*x + 3",
          "is_symbolic": true
        }
      },
      "error": null,
      "latency_ms": 495.7740306854248,
      "timestamp": "2025-12-01T09:56:30.337011"
    },
    {
      "test_id": "MATH_AMB_003",
      "test_name": "Detect division by zero",
      "engine": "math",
      "priority": "HIGH",
      "passed": true,
      "expected_result": "Division by zero flagged",
      "actual_result": {
        "is_valid": false,
        "error": "Division by zero",
        "message": "Expression contains division by zero"
      },
      "error": null,
      "latency_ms": 192.49248504638672,
      "timestamp": "2025-12-01T09:56:30.531194"
    },
    {
      "test_id": "MATH_DOM_001",
      "test_name": "Detect sqrt of negative in real domain",
      "engine": "math",
      "priority": "HIGH",
      "passed": true,
      "expected_result": "Undefined in real domain",
      "actual_result": {
        "is_valid": false,
        "error": "domain error",
        "message": "Square root of negative number is undefined in real domain"
      },
      "error": null,
      "latency_ms": 215.24715423583984,
      "timestamp": "2025-12-01T09:56:30.746858"
    },
    {
      "test_id": "MATH_DOM_002",
      "test_name": "Detect log(0) undefined",
      "engine": "math",
      "priority": "HIGH",
      "passed": true,
      "expected_result": "Undefined - log(0)",
      "actual_result": {
        "is_valid": false,
        "error": "undefined",
        "message": "log(0) is undefined"
      },
      "error": null,
      "latency_ms": 236.82832717895508,
      "timestamp": "2025-12-01T09:56:31.037432"
    },
    {
      "test_id": "MATH_SYM_001",
      "test_name": "Verify true algebraic identity",
      "engine": "math",
      "priority": "CRITICAL",
      "passed": true,
      "expected_result": "TRUE - Difference of squares identity",
      "actual_result": {
        "is_valid": true,
        "result": true,
        "left_side": "x**2 - y**2",
        "right_side": "(x - y)*(x + y)",
        "simplified_difference": "0",
        "message": "Identity is true"
      },
      "error": null,
      "latency_ms": 293.69068145751953,
      "timestamp": "2025-12-01T09:56:31.332128"
    },
    {
      "test_id": "MATH_SYM_002",
      "test_name": "Detect false algebraic identity (missing 2xy)",
      "engine": "math",
      "priority": "CRITICAL",
      "passed": true,
      "expected_result": "FALSE - Should be x²+2xy+y²",
      "actual_result": {
        "is_valid": false,
        "result": false,
        "left_side": "(x + y)**2",
        "right_side": "x**2 + y**2",
        "simplified_difference": "2*x*y",
        "message": "Identity is false"
      },
      "error": null,
      "latency_ms": 290.3871536254883,
      "timestamp": "2025-12-01T09:56:31.623517"
    },
    {
      "test_id": "MATH_SYM_003",
      "test_name": "Detect sqrt(x²) ≠ x (should be |x|)",
      "engine": "math",
      "priority": "HIGH",
      "passed": true,
      "expected_result": "FALSE - sqrt(x²) = |x|, not x",
      "actual_result": {
        "is_valid": false,
        "result": false,
        "left_side": "sqrt(x**2)",
        "right_side": "x",
        "simplified_difference": "-x + sqrt(x**2)",
        "message": "Identity is false"
      },
      "error": null,
      "latency_ms": 268.39327812194824,
      "timestamp": "2025-12-01T09:56:31.893628"
    },
    {
      "test_id": "MATH_SYM_004",
      "test_name": "Verify simple arithmetic (2+2=4)",
      "engine": "math",
      "priority": "CRITICAL",
      "passed": true,
      "expected_result": "TRUE - Basic arithmetic",
      "actual_result": {
        "is_valid": true,
        "result": true,
        "left_side": "4",
        "right_side": "4",
        "simplified_difference": "0",
        "message": "Identity is true"
      },
      "error": null,
      "latency_ms": 278.2092094421387,
      "timestamp": "2025-12-01T09:56:32.172825"
    }
  ],
  "failures": [
    {
      "test_id": "MATH_AMB_001",
      "test_name": "Detect order of operations ambiguity",
      "engine": "math",
      "priority": "HIGH",
      "passed": false,
      "expected_result": "WARNING - Ambiguous (16 vs 1)",
      "actual_result": {
        "status": "ERROR",
        "error": "'Integer' object is not callable",
        "is_valid": false
      },
      "error": null,
      "latency_ms": 140.6238079071045,
      "timestamp": "2025-12-01T09:56:29.840340"
    }
  ],
  "statistics": {
    "total_tests": 9,
    "passed_count": 8,
    "failed_count": 1,
    "latency": {
      "min_ms": 140.6238079071045,
      "max_ms": 495.7740306854248,
      "avg_ms": 267.9606808556451
    },
    "engines_tested": [
      "math"
    ],
    "priorities_tested": [
      "HIGH",
      "CRITICAL",
      "MEDIUM"
    ]
  }
}