code wiki / (root) / nx_labsci_svc.nx

nx_labsci_svc.nx

buildroot/runtime/nx_labsci_svc.nx

24538 B541 linesdepth 5pulls 15 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_labsci_svc.nx -- LAB-SCIENCE SERVICE FACADE. The second organ built on the nx_service base, over a COMPLETELY DIFFERENT domain from nx_gtm_svc -- peptide chemistry, frozen-dessert physics, thermal death kinetics, and water activity. Its existence is the proof the base generalises: the envelope, escaping, error shape, dispatch and self-description are all inherited unchanged; only the verbs and their handlers differ. Two facades, one base, two unrelated sciences = the architecture scales to all seventeen organs by the same recipe, not just the go-to-market subset. USAGE: nx_labsci_svc <verb> [args...] describe peptide.analyze <sequence> (1-letter code, e.g. DRVYIHPF) icecream.freeze <fat_g> <msnf_g> <sugar_g> <sugar_mw_q2> <total_g> thermal.pasteurize <temp_milli_c> <hold_ms> <highfat 0|1> thermal.barrier <ph_milli> <ambient_stable 0|1> water.activity <water_g> <solute_umol> stability.shelf <ref_days> <ref_temp_c> <target_temp_c> <months> <loss_pct> stability.mkt <temp_c>... (2-8 whole Celsius readings, equal duration) stability.separate <t1> <rh1> <months1> <t2> <rh2> <months2> <t3> <rh3> <months3> Same discipline as the sibling facade: NO new domain logic, every number comes from a gated library, structured errors, fail-closed on bad input. stability.separate is the verb that answers what stability.shelf can only flag. ICH gives two storage conditions differing in BOTH temperature and humidity, so the activation energy recovered from them is lumped; three conditions break it apart, and the verb REFUSES a design that cannot -- reporting the conditioning separately, because a design can be solvable and still useless. The stability verbs report GND_VALIDATED, a tier above the rest of this facade's business-adjacent output, and the reason is specific: their activation energy is RECOVERED from ICH's own equivalence claim and then lands inside published Q10 and Ea bands that were never inputs to the derivation. That is the same evidence class as the pasteurisation z-value, which is why thermal.* already reports VALIDATED. genealogy_id: nishi_food_science_suite + service_infrastructure

dependencies 13 imports · 0 importers

nx_syscalls.nx nx_service.nx nx_grounding.nx nx_peptide.nx nx_icecream.nx nx_thermal_process.nx nx_water_activity.nx nx_pow10.nx nx_shelf_life.nx nx_stability.nx nx_labsci_svc.nx

diagram shows first 10 each side; +3 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_service.nxnx_grounding.nxnx_peptide.nxnx_icecream.nxnx_thermal_process.nxnx_water_activity.nxnx_pow10.nxnx_shelf_life.nxnx_stability.nxnx_stability_rh.nxnx_ice_recrystal.nxnx_ice_distribution.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_json_new sys_mmap lab_dispatch nsvc_arg lab_describe nsvc_ok_open nj_putc nj_kv_int nj_key nj_putstr nj_putc ↻ nj_puti nj_putc ↻ sys_mmap ↻ nj_comma nj_putc ↻ nj_kv_str nj_key ↻ nj_putstr ↻ nj_kv_bool nj_key ↻ nj_puts nj_putc ↻ nj_key ↻ nj_kv_str ↻ nj_comma ↻ nj_kv_int ↻ nj_key ↻ nj_puts ↻ nsvc_ok_close_g nsvc_ground nj_comma ↻ nj_kv_str ↻ gnd_name nj_kv_bool ↻ gnd_is_verified gnd_meaning nsvc_ok_close nj_putc ↻

structs

none

consts

54const LAB_MAGIC_13000: i64 = 13000
55const LAB_MAGIC_8192: i64 = 8192
57const LAB_SVC: *u8 = "labsci" as *u8

functions

61func lab_describe(j: *NxJson) -> i64
85func lab_peptide_analyze(j: *NxJson, seq: *u8) -> i64
122func lab_icecream_freeze(j: *NxJson, fat: i64, msnf: i64, sugar: i64, mw: i64, total: i64) -> i64
157func lab_thermal_pasteurize(j: *NxJson, temp: i64, hold: i64, highfat: i64) -> i64
179func lab_thermal_barrier(j: *NxJson, ph: i64, ambient: i64) -> i64
193func lab_water_activity(j: *NxJson, water: i64, solute: i64) -> i64
218func lab_stability_shelf(j: *NxJson, ref_days: i64, ref_c: i64, target_c: i64, months: i64, loss_pct: i64) -> i64
274func lab_stability_mkt(j: *NxJson, argc: i64, argv: *i64) -> i64
330func lab_stability_separate(j: *NxJson, argc: i64, argv: *i64) -> i64
390func lab_icecream_recrystal(j: *NxJson, fat: i64, msnf: i64, sugar: i64, total: i64, tcold: i64, twarm: i64, cycles: i64, days: i64) -> i64
469func lab_join_args(argc: i64, argv: *i64, start: i64, out: *u8, cap: i64) -> i64
called by 1: lab_dispatch
490func lab_dispatch(argc: i64, argv: *i64, j: *NxJson) -> i64
536func main(argc: i64, argv: *i64) -> i64