Piping
Toolset
Home › Validation Methodology — How Every Calculator Is Verified

Validation Methodology — How Every Calculator Is Verified

Content last reviewed · page regenerated 2026-12-03 at build.

Piping Toolset's positioning is deliberately narrow: fast, auditable ASME B31 / BPE calculation reports and design tools for piping engineers — not a replacement for CAESAR II, AutoPIPE, Plant 3D, or hydraulic network solvers. Narrow scope is what makes full verification practical. This page describes exactly how that verification works.

1. One implementation, everywhere

Every calculator is a strictly-typed pure function in a single package (calc-core). The same code runs in your browser and on the server — there is no second implementation to drift. A calculator takes explicit inputs, returns explicit outputs with a PASS/FAIL/computed status and any model-boundary warnings, and touches nothing else.

2. Fixtures are the contract

No calculator module exists without a green fixture: a JSON file holding named cases of exact inputs, expected outputs, the expected verdict, and a numeric tolerance. Three rules govern them:

3. Two harnesses, one fixture set

Two harnesses execute the same fixture JSON through one shared case runner: the project's test suite, and a standalone verification script with no test framework. Run it from a checked-out workspace after npm ci, because several calculation modules import the data-service package:

npm ci
npm run verify
  PASS  piping.b313-wall-thickness  ::  NPS 6 @ 2000 psi, S=20000, Y=0.4, ...
  ...
calc-core: all cases green

Because the runner strips types directly from the production sources, what it verifies is the shipping implementation — not a copy.

4. Red blocks release

Continuous integration runs the type checker, the full test suite, the fixture verification script and the browser smoke tests on every push and every pull request. Production deploys are made by CI from main, and only from a commit where all of it is green.

5. What the worked examples on this site are

Every worked example published on the calculator pages here is a fixture case, shown with its derivation. The numbers you can check by hand on the page are the numbers the release gate asserts on every commit, within each fixture's stated tolerance. The downloadable sample reports are generated from the same cases.

6. What validation does not claim

7. Audit it yourself

The fixture coverage table on the coverage page is generated from the live fixture directory at every build — module by module, case counts, tolerances, and governing references. The calculation changelog records every change to calculation behavior with the fixtures that lock it.