code wiki / (root) / nx_axisvar.nx

nx_axisvar.nx

buildroot/runtime/nx_axisvar.nx

11493 B265 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_axisvar.nx -- DOES THIS JUDGE'S AXIS ACTUALLY VARY? A per-axis distribution census over a whole directory of renders, so a fitness built on those axes can be justified by measurement instead of by three hand-picked examples. nx_axisvar <dir> <prefix> <suffix> e.g. nx_axisvar /tmp bodyfit_ .png WHY IT EXISTS, MEASURED 2026-08-14: a body-evolution run improved 3 points in 10 generations and LOST to random search at equal budget. A 5-point sweep suggested the reason -- contour_axis sat at its ceiling and face_axis was binary -- but five renders is not a population, and changing a shipped fitness on five samples is the same error as tuning until a green appears. The search had already written ~132 renders; this reads ALL of them. ★★★IT REPORTS NUMBERS, NOT A VERDICT. An uncalibrated classifier must publish its distribution and let the reader judge. The ONE verdict it does emit is not a threshold but a FACT: an axis with distinct==1 took the same value on every single input, so it cannot discriminate anything, and including it in a mean dilutes every other axis while contributing nothing. ★NO SILENT CAPS. The directory walk LOOPS getdents64 until it returns 0 -- one call is a prefix of a directory, not a listing, and publishing that prefix's count as a total is how a census becomes a sample nobody knows is partial. The distinct-value table is bounded and says so when it overflows. ★A FAILED JUDGE IS COUNTED AND NAMED, never folded into the population: judged + failed must equal matched, and the sum is printed so the partition can be checked. exit 0 all matched files judged | 2 usage | 3 cannot open dir | 4 nothing matched | 5 some failed license_tier: ORIGINAL. No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_tool_run.nx nx_axisvar.nx

imports: nx_syscalls.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

main av_puts sys_write av_len sys_exit sys_openat_rd 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 ↻ sys_getdents64 av_starts av_ends av_len ↻ tr_run_capture_to tr_run_capture_tr tr_run_capture_core tr_run_capture_core_owned tr_run_capture_core_eviden sys_mmap_shared tr_clock_ms sys_munmap sys_pipe2 sys_fork sys_close sys_default_signal sys_bind_parent_lifetime sys_exit ↻ sys_setpgid

structs

none

consts

28const AV_NAXIS: i64 = 4
29const AV_DIRBUF: i64 = 262144
30const AV_OUTCAP: i64 = 65536
31const AV_JUDGE_TIMEOUT_MS: i64 = 60000
33const AV_MAXDISTINCT: i64 = 64
34const AV_JUDGE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_charjudge.elf"
36const AV_DIRENT_RECLEN_OFF: i64 = 16
37const AV_DIRENT_NAME_OFF: i64 = 19

functions

39func av_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
40func av_puts(s: *u8) -> i64 { sys_write(1, s, av_len(s)); return 0 }
called by 2: av_pnmain calls 2: sys_writeav_len
41func av_pn(v: i64) -> i64
called by 1: main calls 3: av_putssys_mmapsys_write
54func av_rdint(b: *u8, pos: *i64, end: i64) -> i64
called by 1: av_field
78func av_field(out: *u8, n: i64, key: *u8, found: *i64) -> i64
called by 1: main calls 3: av_lensys_mmapav_rdint
104func av_starts(name: *u8, pre: *u8) -> i64
called by 1: main
113func av_ends(name: *u8, suf: *u8) -> i64
called by 1: main calls 1: av_len
125func av_note(dist: *i64, dn: *i64, a: i64, v: i64) -> i64
called by 1: main
137func av_axname(a: i64) -> *u8
called by 1: main
144func main(argc: i64, argv: *i64) -> i64