code wiki / _hdl_build / nx_labsci_gate.nx

nx_labsci_gate.nx

buildroot/runtime/_hdl_build/nx_labsci_gate.nx

9724 B190 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_labsci_gate.nx -- THE MISSING EVIDENCE ORGAN for the lab-science lane. WHY THIS EXISTS: the ecosystem carries a real chemistry/biochemistry stack (nx_peptide + _ext/_msms/ _deconv/_denovo/_identify/_isotope, nx_supplement_screen, nx_thermal_process, nx_water_activity, nx_shelf_life, nx_stability, nx_stability_rh, nx_icecream) exposed through nx_labsci_svc. The lane IS gated -- 43 gates / 497 assertions -- but by `_scratch/labsci_lane_gate.sh`: a shell script, outside any deployable tree, hardcoding one laptop's absolute path (debt seq1352). So its evidence can only be produced by hand, on one machine, into the AUTHORING root -- while the maturity rollup reads the NAS root (181 logs there vs 1164 locally, debt seq1339). The domain is therefore ungradeable not for want of measurement but because the witness cannot run where the reader looks. This organ is the sovereign, deployable replacement path: it builds and runs on the NAS, so the evidence is PRODUCED where the ruler reads instead of copied there (a copied log is a stale claim). WHAT IT MEASURES: the library against PUBLISHED EXTERNAL REFERENCE VALUES, not against itself. Self-agreement is not evidence -- these are standard MS calibration peptides and established regulatory thresholds that were never inputs to our derivations: Angiotensin II DRVYIHPF monoisotopic 1045.5345 Da Bradykinin RPPGFSPFR monoisotopic 1059.5614 Da Substance P RPKPQQFFGLM free acid 1347.7121 Da HTST pasteurisation 72 C / 15 s = the legal PMO schedule pH 4.6 = the C. botulinum high-acid regulatory line Every positive has a NEGATIVE CONTROL so the gate can go RED. It writes knowledge/status/labsci_gate.log with a VERDICT= line, which is exactly the shape the ecomat evkind-2 gate-liveness deriver (el_last_green) reads -- so admitting a `lab-science` domain pointing here yields a MEASURED grade, never a stored assertion. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_peptide.nx nx_thermal_process.nx nx_water_activity.nx nx_labsci_gate.nx

imports: nx_syscalls.nxnx_peptide.nxnx_thermal_process.nxnx_water_activity.nx

imported by: nobody (leaf or entry point)

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

main lg_puts sys_write lg_mass_ok pep_mass_mono_q4 pep_seq_valid pep_len pep_aa_from_char pep_len ↻ pep_aa_from_char ↻ pep_residue_mono_q4 lg_abs lg_check lg_puts ↻ lg_num sys_write ↻ sys_mmap pep_len ↻ lg_check ↻ pep_seq_valid ↻ pep_mass_mono_q4 ↻ pep_mass_avg_q4 pep_seq_valid ↻ pep_len ↻ pep_aa_from_char ↻ pep_residue_avg_q4 pep_mz_q4 lg_abs ↻ tp_pasteurization_complian tp_htst_sched_for tp_sched_time_ms tp_pasteurization_equiv_ms tp_htst_sched_for ↻ tp_sched_temp_milli tp_pasteurization_z_milli tp_implied_z_milli ilog10_milli ipow10_mantissa_q3 tp_equiv_time_at_ref_ms ipow10_q3

structs

none

consts

35const LG_STDOUT: i64 = 1
36const LG_MODE: i64 = 420
37const LG_LOG: *u8 = "knowledge/status/labsci_gate.log"
41const LG_MASS_TOL_Q4: i64 = 100
44const LG_ANGIOTENSIN2_Q4: i64 = 10455345
45const LG_BRADYKININ_Q4: i64 = 10595614
51const LG_SUBSTANCEP_Q4: i64 = 13477121
54const LG_PROTON_Q4: i64 = 10073
57const LG_HTST_TEMP_MILLI_C: i64 = 72000
58const LG_HTST_HOLD_MS: i64 = 15000
59const LG_WEAK_TEMP_MILLI_C: i64 = 60000
60const LG_WEAK_HOLD_MS: i64 = 1000
61const LG_PH_HIGH_ACID_MILLI: i64 = 4000
62const LG_PH_LOW_ACID_MILLI: i64 = 5000

functions

64func lg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(LG_STDOUT, s, n); return 0 }
called by 2: lg_checkmain calls 1: sys_write
65func lg_num(fd: i64, v: i64) -> i64
called by 2: lg_checkmain calls 2: sys_writesys_mmap
78func lg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 2: lg_mass_okmain
81func lg_check(ok: i64, label: *u8, got: i64, want: i64) -> i64
called by 2: lg_mass_okmain calls 2: lg_putslg_num
92func lg_mass_ok(seq: *u8, want: i64, label: *u8) -> i64
called by 1: main calls 3: pep_mass_mono_q4lg_abslg_check
99func main() -> i64