{
 "about": "recipe-table 2.1.0: 2.0.0's amounts, per-line refusals and recipe refusals, with the diluent given only when every line is taken from a liquid stock; otherwise null, with diluentWithheld naming why (weighed-solid, volume-fraction). Inputs are decimal strings in base units (L, mol/L, g/L, g/mol, purity as a fraction); `exact` holds each amount as a fraction.",
 "supersedes": "recipe-table-2.json (recipe-table@2.0.0, published under 0.11.0)",
 "basedOn": {
  "path": "public/verification/lab-calculators/0.11.0/recipe-table-2.json",
  "sha256": "48ad23fcd84eb282794cd5d0212dd480d0824cce3c68aaac4e7d37ca9e3379a2"
 },
 "oracle": {
  "name": "Python fractions",
  "version": "Python 3.13.16 fractions",
  "script": "pipeline/lab-calculators/recipe_table_2_1_reference.py",
  "scriptSha256": "d8a368de14652114fb39e579ea05e499a80b111b86114f6b8be5dfe3fc3816fd",
  "command": "python3 -I -B pipeline/lab-calculators/recipe_table_2_1_reference.py"
 },
 "method": "recipe-table@2.1.0",
 "tolerance": "amounts and diluent relative 1e-9; validity, problems, which amount each line has and diluentWithheld exact",
 "recordedOn": "2026-10-28",
 "count": 27,
 "refused": 12,
 "withheld": 9,
 "cases": [
  {
   "name": "default-rows",
   "about": "The sheet's three default rows in 500 mL: Tris and NaCl weighed, EDTA 1 mL from a 500 mM stock",
   "input": {
    "volume": "0.5",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136"
     },
     {
      "name": "NaCl",
      "target": {
       "molarity": "0.15"
      },
      "formulaWeight": "58.44"
     },
     {
      "name": "EDTA disodium dihydrate",
      "target": {
       "molarity": "0.001"
      },
      "formulaWeight": "372.238",
      "from": {
       "molarity": "0.5"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "mass": 3.0284,
      "exact": {
       "mass": "7571/2500"
      }
     },
     {
      "mass": 4.383,
      "exact": {
       "mass": "4383/1000"
      }
     },
     {
      "volume": 0.001,
      "exact": {
       "volume": "1/1000"
      }
     }
    ],
    "liquids": 0.001,
    "diluent": null,
    "diluentWithheld": [
     "weighed-solid"
    ]
   }
  },
  {
   "name": "purity",
   "about": "Purity 98 percent scales the weighed mass up by 1/0.98",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136",
      "purity": "0.98"
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "mass": 0.6180408163265306,
      "exact": {
       "mass": "7571/12250"
      }
     }
    ],
    "liquids": 0.0,
    "diluent": null,
    "diluentWithheld": [
     "weighed-solid"
    ]
   }
  },
  {
   "name": "purity-on-stock-ignored",
   "about": "Purity on a component from a stock leaves the stock volume as stated",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "EDTA disodium dihydrate",
      "target": {
       "molarity": "0.001"
      },
      "formulaWeight": "372.238",
      "from": {
       "molarity": "0.5"
      },
      "purity": "0.5"
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.0002,
      "exact": {
       "volume": "1/5000"
      }
     }
    ],
    "liquids": 0.0002,
    "diluent": 0.0998
   }
  },
  {
   "name": "mass-solid",
   "about": "1 mg/mL weighed as a solid in 50 mL",
   "input": {
    "volume": "0.05",
    "components": [
     {
      "name": "BSA",
      "target": {
       "massConcentration": "1"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "mass": 0.05,
      "exact": {
       "mass": "1/20"
      }
     }
    ],
    "liquids": 0.0,
    "diluent": null,
    "diluentWithheld": [
     "weighed-solid"
    ]
   }
  },
  {
   "name": "mass-from-mass-stock",
   "about": "1 mg/mL from a 10 mg/mL stock in 50 mL: 5 mL",
   "input": {
    "volume": "0.05",
    "components": [
     {
      "name": "BSA",
      "target": {
       "massConcentration": "1"
      },
      "from": {
       "massConcentration": "10"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.005,
      "exact": {
       "volume": "1/200"
      }
     }
    ],
    "liquids": 0.005,
    "diluent": 0.045
   }
  },
  {
   "name": "mass-from-molar-stock",
   "about": "0.5844 g/L NaCl from a 5 M stock needs the formula weight",
   "input": {
    "volume": "1",
    "components": [
     {
      "name": "NaCl",
      "target": {
       "massConcentration": "0.5844"
      },
      "formulaWeight": "58.44",
      "from": {
       "molarity": "5"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.002,
      "exact": {
       "volume": "1/500"
      }
     }
    ],
    "liquids": 0.002,
    "diluent": 0.998
   }
  },
  {
   "name": "molar-from-mass-stock",
   "about": "10 mM NaCl from a 292.2 g/L stock",
   "input": {
    "volume": "1",
    "components": [
     {
      "name": "NaCl",
      "target": {
       "molarity": "0.01"
      },
      "formulaWeight": "58.44",
      "from": {
       "massConcentration": "292.2"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.002,
      "exact": {
       "volume": "1/500"
      }
     }
    ],
    "liquids": 0.002,
    "diluent": 0.998
   }
  },
  {
   "name": "volume-fraction",
   "about": "10 percent v/v glycerol in 200 mL: 20 mL",
   "input": {
    "volume": "0.2",
    "components": [
     {
      "name": "Glycerol",
      "target": {
       "volumeFraction": "0.1"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.02,
      "exact": {
       "volume": "1/50"
      }
     }
    ],
    "liquids": 0.02,
    "diluent": null,
    "diluentWithheld": [
     "volume-fraction"
    ]
   }
  },
  {
   "name": "volume-fraction-whole",
   "about": "A volume fraction of 1 takes the whole volume and leaves no diluent",
   "input": {
    "volume": "0.01",
    "components": [
     {
      "name": "Water",
      "target": {
       "volumeFraction": "1"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.01,
      "exact": {
       "volume": "1/100"
      }
     }
    ],
    "liquids": 0.01,
    "diluent": null,
    "diluentWithheld": [
     "volume-fraction"
    ]
   }
  },
  {
   "name": "exactly-full",
   "about": "Liquid additions that equal the final volume exactly: valid, diluent zero",
   "input": {
    "volume": "0.01",
    "components": [
     {
      "name": "A",
      "target": {
       "volumeFraction": "0.5"
      }
     },
     {
      "name": "B",
      "target": {
       "molarity": "0.5"
      },
      "from": {
       "molarity": "1"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.005,
      "exact": {
       "volume": "1/200"
      }
     },
     {
      "volume": 0.005,
      "exact": {
       "volume": "1/200"
      }
     }
    ],
    "liquids": 0.01,
    "diluent": null,
    "diluentWithheld": [
     "volume-fraction"
    ]
   }
  },
  {
   "name": "stocks-exceed",
   "about": "Liquid additions above the final volume refuse the recipe (audit B7)",
   "input": {
    "volume": "0.01",
    "components": [
     {
      "name": "A",
      "target": {
       "volumeFraction": "0.6"
      }
     },
     {
      "name": "B",
      "target": {
       "molarity": "0.5"
      },
      "from": {
       "molarity": "1"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "stocks-exceed-final-volume",
    "lines": [
     {
      "volume": 0.006,
      "exact": {
       "volume": "3/500"
      }
     },
     {
      "volume": 0.005,
      "exact": {
       "volume": "1/200"
      }
     }
    ],
    "liquids": 0.011,
    "diluent": null
   }
  },
  {
   "name": "needs-fw-solid",
   "about": "A molarity weighed as a solid with no formula weight",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "X",
      "target": {
       "molarity": "0.01"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "needs-formula-weight"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "needs-fw-cross-stock",
   "about": "A mass target from a molar stock with no formula weight",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "X",
      "target": {
       "massConcentration": "1"
      },
      "from": {
       "molarity": "1"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "needs-formula-weight"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "needs-fw-molar-from-mass",
   "about": "A molar target from a mass stock with no formula weight",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "X",
      "target": {
       "molarity": "0.01"
      },
      "from": {
       "massConcentration": "100"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "needs-formula-weight"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "zero-target",
   "about": "A zero target",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0"
      },
      "formulaWeight": "121.136"
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "not-positive"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "volume-fraction-over-one",
   "about": "A volume fraction above 1",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "X",
      "target": {
       "volumeFraction": "1.5"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "not-positive"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "zero-stock",
   "about": "A stock strength of zero",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "EDTA disodium dihydrate",
      "target": {
       "molarity": "0.001"
      },
      "formulaWeight": "372.238",
      "from": {
       "molarity": "0"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "invalid-stock"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "purity-zero",
   "about": "Purity zero",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136",
      "purity": "0"
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "invalid-purity"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "purity-over-one",
   "about": "Purity above 1",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136",
      "purity": "1.01"
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "invalid-purity"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "zero-volume",
   "about": "A final volume of zero refuses every line",
   "input": {
    "volume": "0",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136"
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "problem": "not-positive"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "one-bad-line",
   "about": "One failed line makes the whole recipe invalid; the good lines keep their amounts",
   "input": {
    "volume": "0.5",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136"
     },
     {
      "name": "X",
      "target": {
       "molarity": "0.01"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "invalid-components",
    "lines": [
     {
      "mass": 3.0284,
      "exact": {
       "mass": "7571/2500"
      }
     },
     {
      "problem": "needs-formula-weight"
     }
    ],
    "liquids": 0.0,
    "diluent": null
   }
  },
  {
   "name": "stocks-only",
   "about": "EDTA 1 mM from a 500 mM stock in 100 mL: every line from a stock, diluent 99.8 mL",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "EDTA disodium dihydrate",
      "target": {
       "molarity": "0.001"
      },
      "formulaWeight": "372.238",
      "from": {
       "molarity": "0.5"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.0002,
      "exact": {
       "volume": "1/5000"
      }
     }
    ],
    "liquids": 0.0002,
    "diluent": 0.0998
   }
  },
  {
   "name": "stocks-only-full",
   "about": "Stocks that sum exactly to the final volume: diluent zero",
   "input": {
    "volume": "0.01",
    "components": [
     {
      "name": "A",
      "target": {
       "molarity": "0.5"
      },
      "from": {
       "molarity": "1"
      }
     },
     {
      "name": "B",
      "target": {
       "molarity": "0.5"
      },
      "from": {
       "molarity": "1"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "volume": 0.005,
      "exact": {
       "volume": "1/200"
      }
     },
     {
      "volume": 0.005,
      "exact": {
       "volume": "1/200"
      }
     }
    ],
    "liquids": 0.01,
    "diluent": 0.0
   }
  },
  {
   "name": "solid-and-stock",
   "about": "A weighed solid beside a stock: no diluent volume, the liquids still reported",
   "input": {
    "volume": "0.1",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136"
     },
     {
      "name": "EDTA disodium dihydrate",
      "target": {
       "molarity": "0.001"
      },
      "formulaWeight": "372.238",
      "from": {
       "molarity": "0.5"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "mass": 0.60568,
      "exact": {
       "mass": "7571/12500"
      }
     },
     {
      "volume": 0.0002,
      "exact": {
       "volume": "1/5000"
      }
     }
    ],
    "liquids": 0.0002,
    "diluent": null,
    "diluentWithheld": [
     "weighed-solid"
    ]
   }
  },
  {
   "name": "solid-and-volume-fraction",
   "about": "A weighed solid and a %v/v row: both reasons",
   "input": {
    "volume": "0.2",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136"
     },
     {
      "name": "Glycerol",
      "target": {
       "volumeFraction": "0.1"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "mass": 1.21136,
      "exact": {
       "mass": "7571/6250"
      }
     },
     {
      "volume": 0.02,
      "exact": {
       "volume": "1/50"
      }
     }
    ],
    "liquids": 0.02,
    "diluent": null,
    "diluentWithheld": [
     "weighed-solid",
     "volume-fraction"
    ]
   }
  },
  {
   "name": "sci288-glucose",
   "about": "SCI-288: glucose at 500 g/L weighed into 1 L gives no diluent volume",
   "input": {
    "volume": "1",
    "components": [
     {
      "name": "Glucose",
      "target": {
       "massConcentration": "500"
      }
     }
    ]
   },
   "expected": {
    "valid": true,
    "lines": [
     {
      "mass": 500.0,
      "exact": {
       "mass": "500/1"
      }
     }
    ],
    "liquids": 0.0,
    "diluent": null,
    "diluentWithheld": [
     "weighed-solid"
    ]
   }
  },
  {
   "name": "solid-and-stocks-exceed",
   "about": "A weighed solid never rescues stocks that exceed the final volume",
   "input": {
    "volume": "0.01",
    "components": [
     {
      "name": "Tris",
      "target": {
       "molarity": "0.05"
      },
      "formulaWeight": "121.136"
     },
     {
      "name": "A",
      "target": {
       "molarity": "1.2"
      },
      "from": {
       "molarity": "1"
      }
     }
    ]
   },
   "expected": {
    "valid": false,
    "problem": "stocks-exceed-final-volume",
    "lines": [
     {
      "mass": 0.060568,
      "exact": {
       "mass": "7571/125000"
      }
     },
     {
      "volume": 0.012,
      "exact": {
       "volume": "3/250"
      }
     }
    ],
    "liquids": 0.012,
    "diluent": null
   }
  }
 ]
}
