nx_surfacedetail_gate.nx
buildroot/runtime/nx_surfacedetail_gate.nx
about
nx_surfacedetail_gate.nx -- THE RATCHET FOR THE SURFACE-DETAIL LEVER.
WHY THIS EXISTS. On 2026-08-23 the human generator's high-frequency detail ceiling was found to
be ONE PICKED CONSTANT -- PF_NB=48 in nx_profile_fit, with no override -- while the oracle holds
up to 4096 points per section and the consumer already held 96. Removing it moved the measured
ceiling (detail_head 187 -> 231, and shape RECOVERED 900 -> 923 at 1.36M triangles). Without a
gate that is a MEASUREMENT, not a RATCHET, and the next lane can re-introduce exactly what was
removed. These teeth lock the three properties that make the lever real.
SUBJECT: the nx_profile_fit ELF, forked for real. A gate that re-derived the binning in-process
would test a copy of the algorithm, not the shipped organ.
THE ANTI-VACUITY TOOTH IS THE BITE PAIR AT THE END, AND IT IS THE POINT. T2 (neutrality) and T3
(dev falls) both pass trivially for an organ that IGNORES the bins argument and always emits 48:
neutrality holds by definition, and dev-falls could pass on noise. The bite asserts the EMITTED
bin count TRACKS THE REQUEST -- 96 when 96 is asked for, 48 when nothing is asked for. An organ
that hardcoded the count back would satisfy every other tooth here and fail this one.
ALSO LOCKED: the format carries "N <bins>" WITH the data, so a consumer can never assume a
resolution the producer did not emit. That is the property that let the ceiling be lifted on
both sides independently.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 28 | const SD_SUBJECT_DEFAULT: *u8 = "./nx_profile_fit.elf" |
| 29 | const SD_ORACLE: *u8 = "knowledge/skin.nxmesh" |
| 30 | const SD_SHIPPED: *u8 = "knowledge/profile_human.dat" |
| 32 | const SD_DIR: *u8 = "/tmp/nx_surfacedetail_gate" |
| 33 | const SD_OUT48: *u8 = "/tmp/nx_surfacedetail_gate/p48.dat" |
| 34 | const SD_OUT96: *u8 = "/tmp/nx_surfacedetail_gate/p96.dat" |
| 35 | const SD_CANON: *u8 = "/tmp/nx_surfacedetail_gate/c96.dat" |
| 37 | const SD_CAPTURE_CAP: i64 = 262144 |
| 38 | const SD_FILE_CAP: i64 = 4194304 |
| 39 | const SD_WORD: i64 = 8 |
| 40 | const SD_ARGV_SLOTS: i64 = 16 |
| 41 | const SD_MODE_DIR: i64 = 493 // 0755 |
| 42 | const SD_ASCII_ZERO: i64 = 48 |
| 43 | const SD_ASCII_NINE: i64 = 57 |
| 44 | const SD_DECIMAL: i64 = 10 |
| 45 | const SD_BYTE_MASK: i64 = 255 |
| 46 | const SD_MISS: i64 = 0 - 999999 |
| 51 | const SD_BINS_DEFAULT: i64 = 48 |
| 52 | const SD_BINS_RAISED: i64 = 96 |
functions
| 54 | func sd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: sd_num_after |
| 57 | func sd_run(subject: *u8, out: *u8, outlen: *i64, bins: *u8) -> i64 |
| 80 | func sd_num_after(buf: *u8, n: i64, key: *u8) -> i64 |
| 122 | func sd_same(a: *u8, b: *u8) -> i64 |
| 140 | func sd_declared_bins(path: *u8) -> i64 |
| 147 | func main(argc: i64, argv: *i64) -> i64 |