code wiki / (root) / nx_skinspectra_gate.nx

nx_skinspectra_gate.nx

buildroot/runtime/nx_skinspectra_gate.nx

8358 B134 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_skinspectra_gate.nx -- THE GATE FOR THE MEASURED SPECTRA, 2026-09-03 (rung ST6). SUBJECT: ss_melanin_mua / ss_melanin_mua_at / ss_hb_mua / ss_hb_lookup in-process, against the SHA-PINNED mirrors in knowledge/fetched. THE STRONGEST TOOTH IS T1 AND IT IS PREFACTOR-FREE. The published melanin law has a prefactor the source itself calls tenfold-variable, so any tooth that depends on it is testing a number nobody can pin. The RATIO of two wavelengths cancels the prefactor entirely and leaves only the exponent: mua(450)/mua(600) must equal (600/450)^3.48 whatever the concentration. That is the part of the law that IS pinned, and it is the part this gate checks. MEASURED: 2721365 against 2721365 micro, exact. T5 AND T7 ARE THE ANTI-STUB PAIR. A lookup that returned a fixed row would pass "the value is non-zero" forever. T5 demands two DIFFERENT wavelengths give DIFFERENT values, and T7 demands a wavelength the table does not contain be REFUSED rather than answered with a neighbour -- handing back the nearest row would be inventing a measurement and calling it data. T7 CARRIES A CORRECTION WORTH READING. On its first run, on the laptop where the mirror is absent, T7 PASSED -- and passed for the wrong reason entirely: the lookup returned REFUSED because the FILE was missing, not because 451 nm is untabulated. A green earned by an unrelated failure is worse than a red, so the tooth now requires T4 to have genuinely parsed the table first and cannot pass anywhere the mirror cannot be read. Verified by the fix dropping the local run from 7/10 to 6/10. Teeth, in order: T1 PREFACTOR-FREE KAT: the 450-to-600 absorption ratio equals (600/450)^3.48. T2 monotone: a shorter wavelength absorbs more. T3 concentration scales linearly -- doubling it doubles the absorption. T4 the mirrored haemoglobin table PARSES: a tabulated wavelength returns two non-zero columns. T5 ANTI-STUB: two different tabulated wavelengths return different values. T6 the two columns DIFFER at one wavelength -- HbO2 and Hb are different molecules, so a lookup returning one column twice cannot hide behind T4 and T5. T7 NEG-CONTROL: an untabulated wavelength REFUSES, with the table PROVEN readable first. T8 NEG-CONTROL: a missing mirror REFUSES rather than returning zero. T9 NEG-CONTROL: a wavelength outside the fitted band REFUSES rather than extrapolating the formula. T10 the source's own conversion arithmetic: mua = 2.303 e x / 64500. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_skinspectra_lib.nx nx_skinspectra_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_skinspectra_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ fq_ctx sys_mmap ↻ fq_atan_small fq_mul fq_atanh_small fq_mul ↻ fq_mul ↻ fq_div fq_sqrt fq_bitlen fq_isqrt vm_isqrt ss_melanin_mua fq_ln fq_div ↻ fq_atanh_small ↻ fq_div ↻ fq_from_int fq_exp fq_mul ↻

structs

none

consts

40const SG_MICRO: i64 = 1000000
41const SG_SLOT: i64 = 8
42const SG_RATIO_TOL_MICRO: i64 = 20000
43const SG_L_BLUE: i64 = 450
44const SG_L_GREEN: i64 = 550
45const SG_L_RED: i64 = 600
46const SG_L_ODD: i64 = 451
47const SG_L_OUT: i64 = 1200
48const SG_HB_PATH: *u8 = "knowledge/fetched/cmp_skintwin_hemoglobin_omlc.html"
49const SG_HB_MISSING: *u8 = "knowledge/fetched/cmp_skintwin_no_such_mirror.html"
50const SG_E_PROBE: i64 = 100000
51const SG_X_PROBE: i64 = 150
52const SG_TWO: i64 = 2

functions

54func main(argc: i64, argv: *i64) -> i64