kitchenmetrics-public

Technical & Verification Notes

Current through v1.9.8 (2026-11-15) · Google Play (com.kitchenmetrics.app, versionCode 28) · App Store (id6802054330, build 25).

1. Runtime Architecture (Single Shared Core)

KitchenMetrics runs completely offline from one shared web core (app/src/main/assets/) packaged into both mobile stores:


2. Automated Verification (98 suites · 28,712 assertions)

Verified via node tests/run_all.js on 2026-11-15:

Layer Coverage Highlights Result
Node Suites (95 .test.js files) Physics solvers, unit conversions, ASHRAE coefficients, Cleland/Pham freezing, cavity plane sections, 2-stage FD cooking, USAR costing, HACCP ledgers, i18n parity, Android/iOS compliance, backup/restore, published privacy policy hash Passed (0 failures)
Browser Stub Suites (3 .test.html files) smoke.test.html (91), i18n.test.html (21,406), cost_engine.test.html (64) against headless DOM stub Passed (0 failures)
Total 98 suites 28,712 passed, 0 failed

(As printed by run_all.js: browser stub suites do not run a full CSS/layout engine; layout and visual UI are checked separately on device/headless Chromium.)

Key Scientific & Engineering Checks Enforced Automatically

  1. ASHRAE Choi–Okos Coefficients & Table Audit (ashrae_model_equations.test.js, ashrae_python_parity.test.js, ashrae_letter.test.js):
    • 37 of 38 polynomial coefficients for water, protein, fat, carbohydrate, fiber, and ash properties (ρ, c_p, k, α) match the published ASHRAE Handbook — Refrigeration (ch. 9) tabulation.
    • Cross-checking the water density quadratic printed in the Handbook showed that taken literally it predicts water becoming denser from 0 °C to 100 °C (1012 kg/m³ at 100 °C vs real ~958 kg/m³). The engine uses the physically consistent quadratic, and the discrepancy reported on 31 July 2026 was formally confirmed by the responsible ASHRAE technical committee.
  2. Transient Heat Transfer & Lethality (thermal_*.test.js, lethality*.test.js):
    • Combined convective + linearized radiative surface transfer (h_eff), Biot-number series convergence across slab / cylinder / sphere / brick geometry (C2 shape factor), short-time small-Fourier oracle (thermal_short_time_oracle.test.js), Bigelow thermal death integration during temperature ramp + hold (6.0-log EFSA target), and monotonic checks preventing pasteurisation under-estimation when Bi or core targets change.
    • Sequential 2-Stage Double Cooking (thermal_staged.test.js): Implicit/explicit 1D finite-difference radial temperature solver passing Stage 1’s heterogeneous core-to-surface profile directly as Stage 2’s initial condition.
  3. Freezing Time (freezing*.test.js, cleland_engine.test.js, asymmetric_wall_freeze.test.js):
    • Pham (1986) enthalpy-based freezing time with unfreezable bound-water allowance (frzFreezableWater), Choi–Okos frozen conductivity k_s, volumetric heat capacities C_l / C_s, and Cleland (2011) shape dimensionality E.
    • Declares an explicit ±20% accuracy band (wider if user omits T_f), requires physical sample weight (frzMass) rather than guessing mass silently, and includes hollow-carcass asymmetric-wall freezing conduction paired with plane-section geometry (Zenodo 10.5281/zenodo.22747922).
  4. USAR Food Costing & Circular Sub-Recipes (recipes.cycle.test.js, recipes_cold_start.test.js, cooking_energy.test.js):
    • Clean separation between Ingredient Mode (no spurious 0% Prime Cost claim) and Full Unit Cost / Recipes Mode (USAR < 65% benchmark), plus cycle detection on nested sub-recipes.
  5. Regulatory & Data Integrity (tpc_limits.test.js, documents.test.js, food_code_binding.test.js, self_counts.test.js, docs_current.test.js):
    • Every statutory TPC claim, food temperature target (e.g., FDA Food Code 3-401.11(A)(3) game-bird vs poultry reclassification fixed in 1.9.3), and document count is checked automatically against documents.js (50 tracked documents) and tpc_limits.js (12 jurisdictions).
    • self_counts.test.js and privacy_policy_published.test.js verify that ledger totals and the published SHA-256 hash of privacy-policy.html do not drift silently.

3. Privacy & Security Guarantees

Verified by static compliance tests (android_compliance.test.js, ios_compliance.test.js, privacy.manifest.test.js, vault.scoping.test.js, backup_restore.test.js):