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

Validation Methodology — How Every Calculator Is Verified

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 runners, one fixture set

The same fixture JSON is executed by two independent harnesses: the project's test suite, and a zero-dependency verification script that any auditor can run with bare Node — no package installation, no framework:

node scripts/verify-core.mjs
  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 fixture gate, the full test suite, and the type checker on every push and every pull request. The production site only deploys from a commit where all of it is green. There is no manual override path.

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 byte-for-byte the numbers the release gate asserts on every commit. 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.