{
  "capability_id": "chemistry.equilibrium.weak_base",
  "tool_id": "weak-base-equilibrium",
  "engine": "weak-base-equilibrium",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-17T06:35:12.150Z",
  "engine_build": "2026-09-17",
  "test_count": 13,
  "passed": 13,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 2,
      "passed": 2
    },
    "boundary": {
      "total": 6,
      "passed": 6
    },
    "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/weak-base-equilibrium",
  "api": "https://www.calculatorx.com/api/v1/calc/weak-base-equilibrium",
  "schema_input": "https://www.calculatorx.com/schemas/chemistry.equilibrium.weak_base.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/chemistry.equilibrium.weak_base.output.json",
  "assumptions": [
    "Monoprotic B + H2O ⇌ BH+ + OH−",
    "Activity coefficients ≈ 1",
    "Kw = 1e-14 at 25 °C when mode=ice",
    "Not Henderson–Hasselbalch",
    "Not weak-acid ICE",
    "Not pH = −log10[H+] identities",
    "Not polyprotic, not titration"
  ],
  "limitations": [
    "Monoprotic B only; not polyprotic, not a weak acid, not activity coefficients",
    "Not Henderson–Hasselbalch (buffer pair as given)",
    "Not weak-acid ICE HA ⇌ H+ + A−",
    "Not the water-ion identity page pH=−log10[H+]",
    "Kw = 1e-14 at 25 °C when mode=ice"
  ],
  "boundary_conditions": [
    "missing C → MISSING_REQUIRED_INPUT",
    "C ≤ 0 or Kb ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "pKb and Kb together, or Ka/pKa, or HA/A → MIXED_INPUT_ENCODING",
    "hh_ph is not a mode on this page"
  ],
  "sources": [
    {
      "title": "OpenStax Chemistry 2e — Weak Bases",
      "section": "Equilibrium of a weak base",
      "url": "https://openstax.org/books/chemistry-2e/pages/14-3-relative-strengths-of-acids-and-bases",
      "supports": "Kb = [BH+][OH−]/[B]; ICE from formal C; dilute water may include Kw",
      "kind": "reference"
    },
    {
      "title": "IUPAC Gold Book — basicity constant",
      "section": "basicity constant",
      "url": "https://goldbook.iupac.org/terms/view/B00618",
      "supports": "Kb is the equilibrium constant for B + H2O ⇌ BH+ + OH−",
      "kind": "standard"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:957fd0340cb47dca39c17dae47aada06476ad8c08abba17ce9852e7ea0977420",
  "tests": [
    {
      "id": "golden-base-no-water",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "C": 0.1,
        "Kb": 0.000018,
        "mode": "ice_no_water"
      },
      "expect": {
        "oh": 0.001332670973077975,
        "BH": 0.001332670973077975,
        "model": "weak_base_ice",
        "include_water": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "ice_no_water",
        "pH": 11.124722938776406,
        "pOH": 2.8752770612235934,
        "h": 7.503727622568977e-12,
        "oh": 0.00133267097408,
        "B": 0.09866732902592,
        "BH": 0.00133267097408,
        "C": 0.1,
        "Kb": 0.000018,
        "pKb": 4.7447274948966935,
        "fraction_ionized": 0.0133267097408,
        "Kw": 1e-14,
        "pKw": 14,
        "T_C": 25,
        "model": "weak_base_ice",
        "include_water": false,
        "solver": {
          "method": "bisection",
          "iterations": 33,
          "residual": 2.68775200867e-15
        }
      },
      "tol": 1e-8
    },
    {
      "id": "golden-base-water",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "C": 0.1,
        "Kb": 0.000018
      },
      "expect": {
        "model": "weak_base_ice",
        "include_water": true,
        "C": 0.1
      },
      "expectWarning": null,
      "actual": {
        "mode": "ice",
        "pH": 11.124723226136462,
        "pOH": 2.875276773863538,
        "h": 7.503722657571816e-12,
        "oh": 0.00133267185587,
        "B": 0.09866732815163373,
        "BH": 0.0013326718483662773,
        "C": 0.1,
        "Kb": 0.000018,
        "pKb": 4.7447274948966935,
        "fraction_ionized": 0.013326718483662773,
        "Kw": 1e-14,
        "pKw": 14,
        "T_C": 25,
        "model": "weak_base_ice",
        "include_water": true,
        "solver": {
          "method": "bisection",
          "iterations": 24,
          "residual": 3.14336051842e-15
        }
      },
      "tol": 1e-8
    },
    {
      "id": "boundary-base-pkb",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0.1,
        "pKb": 5
      },
      "expect": {
        "pKb": 5,
        "model": "weak_base_ice"
      },
      "expectWarning": null,
      "actual": {
        "mode": "ice",
        "pH": 10.997829246869566,
        "pOH": 3.0021707531304345,
        "h": 1.0050108563577444e-11,
        "oh": 0.000995014127135,
        "B": 0.09900498588291512,
        "BH": 0.0009950141170848915,
        "C": 0.1,
        "Kb": 0.000009999999999999999,
        "pKb": 5,
        "fraction_ionized": 0.009950141170848914,
        "Kw": 1e-14,
        "pKw": 14,
        "T_C": 25,
        "model": "weak_base_ice",
        "include_water": true,
        "solver": {
          "method": "bisection",
          "iterations": 23,
          "residual": 3.22819381151e-15
        }
      },
      "tol": 1e-8
    },
    {
      "id": "boundary-base-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Kb": 0.00001
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "C is required"
    },
    {
      "id": "boundary-base-c",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0,
        "Kb": 0.00001
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "C must be greater than zero"
    },
    {
      "id": "boundary-base-mixed",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0.1,
        "pKb": 5,
        "Kb": 0.00001
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Use pKb or Kb, not both encodings"
    },
    {
      "id": "boundary-base-ka",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0.1,
        "Ka": 0.00001
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Use Kb or pKb, not Ka/pKa — this is not a weak-acid ICE"
    },
    {
      "id": "boundary-base-hh",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0.1,
        "Kb": 0.00001,
        "mode": "hh_ph"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be ice|ice_no_water"
    },
    {
      "id": "property-base-quad",
      "ok": true,
      "kind": "property",
      "detail": "x^2+Kb x=Kb C",
      "expect": 0.001332670973077975,
      "actual": 0.00133267097408
    },
    {
      "id": "property-base-mass",
      "ok": true,
      "kind": "property",
      "detail": "C=[B]+[BH+]",
      "expect": 0.1,
      "actual": 0.1
    },
    {
      "id": "property-base-charge",
      "ok": true,
      "kind": "property",
      "detail": "[OH−]=[BH+]+[H+]",
      "expect": 0.00133267185587,
      "actual": 0.00133267185587
    },
    {
      "id": "property-base-model",
      "ok": true,
      "kind": "property",
      "detail": "weak_base_ice",
      "expect": true,
      "actual": "weak_base_ice"
    },
    {
      "id": "property-base-pkb",
      "ok": true,
      "kind": "property",
      "detail": "pKb encoding",
      "expect": 5,
      "actual": 5
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 13,
      "total": 13,
      "golden": 2,
      "boundary": 6,
      "property": 5
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-17T03:27:38.061Z",
  "rendered_at": "2026-09-17T06:35:12.150Z",
  "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": "073f39f84d9cd562e664208103e22a8a62652562fac96c14dfe441e16db36913",
      "output_schema_sha256": "9f760ee4fdac66ddabe7e16ab26496521c474716b27af9eec45e8f8d79d47f04",
      "evidence_sha256": "3029e555ea9f1e4c4136f94efbf4ef3957c33723f0854c084eab3a52cf3d08d3",
      "evidence_core_sha256": "3029e555ea9f1e4c4136f94efbf4ef3957c33723f0854c084eab3a52cf3d08d3",
      "capability_sha256": "72f819b4941b497a16616be4291c36c04b21771560685899f98016cf85ad2dd5",
      "engine_sha256": "577dd02827ddc989c9ec83548106b0de2da132cdaad4c2e72f4dc05cde6f3e07",
      "mcp_contract_sha256": "a0951a99ea7017485ae852239b46888380ab942a7571f6a90cc299bd18753be2"
    },
    "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"
  }
}
