{
  "capability_id": "electrical.led_resistor",
  "tool_id": "led-resistor",
  "engine": "led-resistor",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-16T22:03:43.722Z",
  "engine_build": "2026-09-10",
  "test_count": 7,
  "passed": 7,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 2,
      "passed": 2
    },
    "boundary": {
      "total": 3,
      "passed": 3
    },
    "property": {
      "total": 2,
      "passed": 2
    }
  },
  "engine_tested": true,
  "expert_reviewed": true,
  "internally_reviewed": false,
  "review_kind": "expert",
  "source_checked": true,
  "reviewed_by": "CalculatorX electrical review",
  "reviewer_role": "electrical-engineer",
  "last_reviewed": "2026-08-08",
  "expert_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX electrical review",
      "role": "electrical-engineer"
    },
    "reviewed_at": "2026-08-08",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "expert"
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/electric/led-resistor",
  "api": "https://www.calculatorx.com/api/v1/calc/led-resistor",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.led_resistor.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.led_resistor.output.json",
  "assumptions": [],
  "limitations": [
    "Vs ≤ n·Vf → SUPPLY_TOO_LOW"
  ],
  "boundary_conditions": [
    "Vs ≤ n·Vf → SUPPLY_TOO_LOW",
    "n not positive int → N_MUST_BE_POSITIVE_INT"
  ],
  "sources": [
    {
      "title": "LED manufacturer application notes",
      "section": "Series resistor sizing",
      "supports": "R=(Vs−Vf)/If",
      "kind": "reference"
    },
    {
      "title": "Horowitz & Hill — The Art of Electronics",
      "section": "LED drive",
      "supports": "Series ballast from supply minus Vf",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:4066d1070feb0532edaab20a3c8ada04e1767269354ace580460f753c1969ef6",
  "tests": [
    {
      "id": "basic-150",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "Vs": 5,
        "Vf": 2,
        "If": 0.02
      },
      "expect": {
        "R_ohm": 150,
        "P_R_W": 0.06
      },
      "expectWarning": null,
      "actual": {
        "Vs": 5,
        "Vf": 2,
        "If": 0.02,
        "n": 1,
        "V_led": 2,
        "R_ohm": 150,
        "P_R_W": 0.060000000000000005,
        "P_led_W": 0.04
      },
      "tol": 1e-12
    },
    {
      "id": "two-led",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "Vs": 9,
        "Vf": 3,
        "If": 0.01,
        "n": 2
      },
      "expect": {
        "R_ohm": 300,
        "V_led": 6
      },
      "expectWarning": null,
      "actual": {
        "Vs": 9,
        "Vf": 3,
        "If": 0.01,
        "n": 2,
        "V_led": 6,
        "R_ohm": 300,
        "P_R_W": 0.030000000000000002,
        "P_led_W": 0.06
      },
      "tol": 1e-12
    },
    {
      "id": "supply-low",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Vs": 3,
        "Vf": 3.2,
        "If": 0.02
      },
      "expectError": "SUPPLY_TOO_LOW",
      "code": "SUPPLY_TOO_LOW",
      "error": "supply must exceed total LED forward drop"
    },
    {
      "id": "bad-n",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Vs": 5,
        "Vf": 2,
        "If": 0.02,
        "n": 0
      },
      "expectError": "N_MUST_BE_POSITIVE_INT",
      "code": "N_MUST_BE_POSITIVE_INT",
      "error": "n must be a positive integer"
    },
    {
      "id": "boundary-150",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Vs": 5,
        "Vf": 2,
        "If": 0.02
      },
      "expect": {
        "R_ohm": 150
      },
      "expectWarning": null,
      "actual": {
        "Vs": 5,
        "Vf": 2,
        "If": 0.02,
        "n": 1,
        "V_led": 2,
        "R_ohm": 150,
        "P_R_W": 0.060000000000000005,
        "P_led_W": 0.04
      },
      "tol": 1e-12
    },
    {
      "id": "property-R",
      "ok": true,
      "kind": "property",
      "detail": "150Ω",
      "expect": 150,
      "actual": 150
    },
    {
      "id": "property-half-I",
      "ok": true,
      "kind": "property",
      "detail": "half I → 2R",
      "expect": 300,
      "actual": 300
    }
  ],
  "tier": "expert_verified",
  "verification": {
    "tests": {
      "passed": 7,
      "total": 7,
      "golden": 2,
      "boundary": 3,
      "property": 2
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-06T13:16:40.891Z",
  "rendered_at": "2026-09-16T22:03:43.722Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "48affd725874560e6d754555aa761fe454e1a60bfaae53f033192436713920d7",
      "output_schema_sha256": "3aa10d5b0c3d531fdbc2950f67df62bc7633c6e5ef395c30f9cce6e85b2df26e",
      "evidence_sha256": "5dd95c00f014c9435750add30f6c80777dbdea0f288a737f06e5681688a6a7bf",
      "evidence_core_sha256": "5dd95c00f014c9435750add30f6c80777dbdea0f288a737f06e5681688a6a7bf",
      "capability_sha256": "62b412a18c7737d921a2e6e52fddb2ab43b850bcc17c65698ac4f3d3f56f4381",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.0"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
