{
  "capability_id": "chemistry.acid_base.henderson_hasselbalch",
  "tool_id": "henderson-hasselbalch",
  "engine": "henderson-hasselbalch",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-16T11:29:50.772Z",
  "engine_build": "2026-09-16",
  "test_count": 11,
  "passed": 11,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 1,
      "passed": 1
    },
    "boundary": {
      "total": 5,
      "passed": 5
    },
    "property": {
      "total": 5,
      "passed": 5
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/chemistry/henderson-hasselbalch",
  "api": "https://www.calculatorx.com/api/v1/calc/henderson-hasselbalch",
  "schema_input": "https://www.calculatorx.com/schemas/chemistry.acid_base.henderson_hasselbalch.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/chemistry.acid_base.henderson_hasselbalch.output.json",
  "assumptions": [
    "Monoprotic buffer; HA and A− are the pair as given",
    "Activity coefficients ≈ 1",
    "Not ICE equilibrium",
    "Not pH = −log10[H+]",
    "Not polyprotic"
  ],
  "limitations": [
    "Monoprotic buffer pair as given — not ICE equilibrium",
    "Not pH = −log10[H+]",
    "Not activity coefficients or polyprotic"
  ],
  "boundary_conditions": [
    "missing pKa and missing Ka → MISSING_REQUIRED_INPUT",
    "pKa and Ka together → MIXED_INPUT_ENCODING",
    "HA ≤ 0 or A ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "Ka ≤ 0 → VALUE_MUST_BE_POSITIVE"
  ],
  "sources": [
    {
      "title": "OpenStax Chemistry 2e — Acid-Base Buffers",
      "section": "Henderson–Hasselbalch equation",
      "url": "https://openstax.org/books/chemistry-2e/pages/14-6-buffers",
      "supports": "pH = pKa + log10([base]/[acid]) for a conjugate pair",
      "kind": "reference"
    },
    {
      "title": "IUPAC Gold Book — buffer solution",
      "section": "conjugate acid–base pair",
      "url": "https://goldbook.iupac.org/terms/view/B00753",
      "supports": "A buffer is a conjugate acid–base pair whose ratio sets pH",
      "kind": "standard"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:5c7630641001622bbc72af7da46a440155d493a7e0c882f5cb5f01120b9235e5",
  "tests": [
    {
      "id": "golden-hh",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "pKa": 5,
        "HA": 0.1,
        "A": 0.2
      },
      "expect": {
        "pH": 5.301029995663981,
        "pKa": 5,
        "HA": 0.1,
        "A": 0.2,
        "ratio": 2,
        "model": "henderson_hasselbalch"
      },
      "expectWarning": null,
      "actual": {
        "pH": 5.301029995663981,
        "pKa": 5,
        "Ka": 0.000009999999999999999,
        "HA": 0.1,
        "A": 0.2,
        "ratio": 2,
        "model": "henderson_hasselbalch"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-hh",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "pKa": 5,
        "HA": 0.1,
        "A": 0.1
      },
      "expect": {
        "pH": 5,
        "ratio": 1
      },
      "expectWarning": null,
      "actual": {
        "pH": 5,
        "pKa": 5,
        "Ka": 0.000009999999999999999,
        "HA": 0.1,
        "A": 0.1,
        "ratio": 1,
        "model": "henderson_hasselbalch"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-hh-ka",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Ka": 0.00001,
        "HA": 0.1,
        "A": 0.2
      },
      "expect": {
        "pH": 5.301029995663981,
        "pKa": 5
      },
      "expectWarning": null,
      "actual": {
        "pH": 5.301029995663981,
        "pKa": 5,
        "Ka": 0.00001,
        "HA": 0.1,
        "A": 0.2,
        "ratio": 2,
        "model": "henderson_hasselbalch"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-hh-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "pKa": 5,
        "HA": 0.1
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "A is required"
    },
    {
      "id": "boundary-hh-ha",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "pKa": 5,
        "HA": 0,
        "A": 0.1
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "HA must be greater than zero"
    },
    {
      "id": "boundary-hh-mixed",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "pKa": 5,
        "Ka": 0.00001,
        "HA": 0.1,
        "A": 0.1
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Use pKa or Ka, not both encodings"
    },
    {
      "id": "property-hh-ph",
      "ok": true,
      "kind": "property",
      "detail": "5+log10(2)",
      "expect": 5.301029995663981,
      "actual": 5.301029995663981
    },
    {
      "id": "property-hh-ratio",
      "ok": true,
      "kind": "property",
      "detail": "2",
      "expect": 2,
      "actual": 2
    },
    {
      "id": "property-hh-equal",
      "ok": true,
      "kind": "property",
      "detail": "pH=pKa",
      "expect": 5,
      "actual": 5
    },
    {
      "id": "property-hh-ka",
      "ok": true,
      "kind": "property",
      "detail": "Ka→pKa",
      "expect": 5.301029995663981,
      "actual": 5.301029995663981
    },
    {
      "id": "property-hh-model",
      "ok": true,
      "kind": "property",
      "detail": "henderson_hasselbalch",
      "expect": true,
      "actual": "henderson_hasselbalch"
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 11,
      "total": 11,
      "golden": 1,
      "boundary": 5,
      "property": 5
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-16T11:18:24.767Z",
  "rendered_at": "2026-09-16T11:29:50.772Z",
  "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": "f0b0289022c148bec4b0739d920e5562090582a1e0e8ae56ba5806785179efa6",
      "output_schema_sha256": "45b6ae449f91891986b9f608b2c581ee5b8701f3de2dd95bcc44625cb6c13dfc",
      "evidence_sha256": "74da54e246200218591410c669e9a8ee1b34b5150b12e317730862681ed90bd8",
      "evidence_core_sha256": "74da54e246200218591410c669e9a8ee1b34b5150b12e317730862681ed90bd8",
      "capability_sha256": "213eef0f57fe091e44559de31661186f43f4f120abc73e3dba954a51d901f643",
      "engine_sha256": "962b388bf6ab964c25534c158f4effd05da87b7802057b995c26b059ee2f2a06",
      "mcp_contract_sha256": "eaab9a259f55e96fcf88ca76f89a5314de080a19cf54b6d1e4c6633c4574abcf"
    },
    "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"
  }
}
