code wiki / (root) / nx_faceanat_scale_gate.nx

nx_faceanat_scale_gate.nx

buildroot/runtime/nx_faceanat_scale_gate.nx

9973 B173 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic faceanat
docsdependenciesstructsconstsfunctions

about

nx_faceanat_scale_gate.nx -- THE REFEREE FOR THE FACE MODEL'S SCALE (aesthetictwin AT17, 2026-09-02). THE DEFECT: nx_faceanat declared MMU = 35 (3.5 units per mm) from a comment that took a 150 mm HALF-width for a skull that is about 145 mm WIDE, and every millimetre the aesthetictwin board publishes, and every tissue relief the face emitter draws, went through that constant. Four witnesses of the model's OWN declared landmarks against the ANSUR II female means say about 7 to 8.7 units per mm -- a 2.2x error that the board carried as an open contradiction since 2026-08-28. THE MECHANISM: knowledge/faceanat_scale.conf carries one WITNESS row per landmark pair (the model's declared span in units, the ANSUR II female mean in tenths of a mm, n, the refs key), one DERIVED row (the median units-per-mm x10 with the min and max of the witnesses) and one SPREAD row (the widest witness disagreement tolerated, permil of the median, with its reasoning beside it in the conf). This gate RECOMPUTES the derivation from the witness rows and holds nx_faceanat's fa_mmu_x10() to it -- a typed constant that drifts from its own derivation cannot pass -- and its neg-control asserts the LEGACY 35 lies OUTSIDE the witness band: the tooth that could not have passed before this rung existed. The population bound the reader prints (a military sample, not a civilian approximation) travels with the number in the conf and in the verdict. THE SPREAD IS A SEPARATE FINDING FROM THE SCALE: the four witnesses disagree by 218 permil (MEASURED live 2026-09-02), which is the model's PROPORTION error landmark to landmark, not its scale. The bar for it is a conf row so it can be RATCHETED DOWN as the proportions are re-fit -- never a literal here that gets loosened to flatter the number. SCOPE: this proves the SCALE. It does not re-baseline the emitted relief -- that is a visual acceptance under the operator's three-party rule and is a separate rung. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_faceanat.nx nx_faceanat_scale_gate.nx

imports: nx_gate_verdict.nxnx_faceanat.nx

imported by: nobody (leaf or entry point)

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

main gv_head gv_puts sys_write 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_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_puts ↻ gv_num ↻ gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻

structs

none

consts

27const FS_CONF: *u8 = "knowledge/faceanat_scale.conf"
28const FS_MAXW: i64 = 8 // witness rows this gate will read (the conf carries 4 today; a fifth is welcome)
29const FS_MIN_N: i64 = 1000 // a witness mean over fewer subjects than this is not a population reading
30const FS_LEGACY_MMU_X10: i64 = 35 // the typed constant this rung retires from the measurement path
31const FS_TOL_X10: i64 = 1 // the derived literal may differ from the recomputed median by one tenth (integer rounding)
32const FS_X100: i64 = 100
33const FS_PERMIL: i64 = 1000
34const FS_CH_SPACE: i64 = 32
35const FS_CH_NL: i64 = 10
36const FS_CH_0: i64 = 48
37const FS_CH_9: i64 = 57
38const FS_CH_W: i64 = 87
39const FS_CH_D: i64 = 68
40const FS_CH_S: i64 = 83 // the `S <permil>` row: the witness-spread bar lives in the conf with its reasoning, never here

functions

43func fs_int(b: *u8, e: i64, ip: *i64) -> i64
called by 1: main
61func fs_eol(b: *u8, n: i64, i: i64) -> i64 { var j: i64 = i; var f: i64 = n; var go: i64 = 1; while go == 1 { if j >= n { go = 0 } else { if b[j] == (FS_CH_NL as u8) { f = j; go = 0 } else { j = j + 1 } } } return f }
called by 1: main
63func fs_space(b: *u8, e: i64, i: i64) -> i64 { var j: i64 = i; var f: i64 = e; var go: i64 = 1; while go == 1 { if j >= e { go = 0 } else { if b[j] == (FS_CH_SPACE as u8) { f = j; go = 0 } else { j = j + 1 } } } return f }
called by 1: main
65func main(argc: i64, argv: *i64) -> i64