code wiki / (root) / nx_gensota.nx

nx_gensota.nx

buildroot/runtime/nx_gensota.nx

16121 B414 linesdepth 5pulls 5 transitivereach 1 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_gensota.nx -- THE per-generation SOTA rollup instrument (2026-08-01, gensota ws). WHY: /code/sota scores each family-tree generation, but its band colors were ASSESSED by hand. This organ DERIVES the per-generation numbers from the live eco graph so the page's claims are measured, not asserted. WHAT (per generation of the import DAG, BFS from the god roots, same walk as nx_eco_graph_pedigree): total modules | validation artifacts (name-classified _test/_gate/_bench/_demo/_probe/_smoke) | working organs | working organs with a name-matching validation sibling (<base>_gate.nx or <base>_test.nx) -> attach_permil. VERDICT: RED if ANY generation with organs misses the attach bar (headline = MIN across generations, never the mean), or if the partition fails to SUM to the node count (a partition is a claim: check the parts sum). BARS: knowledge/gensota_bars.conf `attach_bar_permil=<n>` (rule 11: the threshold lives in data). The argv override exists FOR THE GATE: a gate must be able to make its instrument fail (bar=1001 is the crafted-bad input). NON-VACUITY: missing store / zero nodes / zero edges = INSTRUMENT-BLIND exit 3; absent bars conf with no override = REFUSED exit 4 -- a defaulted bar is a wish. Comparisons CROSS-MULTIPLY (att*1000 vs bar*org), never divide-then-compare: the integer-truncation silent-threshold-shift class (banked 2026-08-01). Usage: nx_gensota [store] [bar_permil_override] Exit: 0 GREEN | 1 RED | 3 INSTRUMENT-BLIND | 4 REFUSED-NO-BARS license_tier: ORIGINAL expect_exit:0 No hw writes (Rule 26).

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_eco_graph.nx nx_gensota.nx nx_gensota_gate.nx

imports: nx_syscalls.nxnx_eco_graph.nx

imported by: nx_gensota_gate.nx

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

main gs_atoi gs_worklist eg_load sys_mmap sov_get_ints sys_mmap ↻ ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_scan_seglist sov_get_copy sys_mmap ↻ ss_get ↻ gs_w sys_write gs_slen sys_mmap ↻ gs_tab_insert gs_hash_node gs_wn sys_mmap ↻ sys_write ↻ gs_isval gs_ends gs_nlen gs_slen ↻ gs_sib gs_nlen ↻ gs_tab_has gs_hash_str gs_nameeq sys_write ↻ gs_nlen ↻ sys_exit gs_read_bar sys_mmap ↻ sys_read_file

structs

none

consts

25const GS_TAB_SLOTS: i64 = 65536
26const GS_TAB_SAFE_N: i64 = 60000
27const GS_NAME_CAP: i64 = 300
28const GS_MAXGEN_CAP: i64 = 64
29const GS_HASH_SEED: i64 = 5381
30const GS_HASH_MUL: i64 = 33
31const GS_HASH_MOD: i64 = 1000000007
32const GS_PERMIL: i64 = 1000
33const GS_BAR_IMPOSSIBLE: i64 = 1001

functions

35func gs_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: gs_wgs_ends
36func gs_w(fd: i64, s: *u8) -> i64 { sys_write(fd, s, gs_slen(s)); return 0 }
37func gs_wn(fd: i64, v: i64) -> i64
called by 2: gs_worklistgs_run calls 2: sys_mmapsys_write
51func gs_nlen(g: *EcoGraph, idx: i64) -> i64
57func gs_ends(g: *EcoGraph, idx: i64, suf: *u8) -> i64
called by 1: gs_isval calls 2: gs_nlengs_slen
69func gs_isval(g: *EcoGraph, idx: i64) -> i64
called by 2: gs_worklistgs_run calls 1: gs_ends
79func gs_hash_node(g: *EcoGraph, idx: i64) -> i64
called by 1: gs_tab_insert
89func gs_hash_str(s: *u8) -> i64
called by 1: gs_tab_has
98func gs_nameeq(g: *EcoGraph, idx: i64, s: *u8) -> i64
called by 1: gs_tab_has
108func gs_tab_insert(tab: *i64, g: *EcoGraph, idx: i64) -> i64
called by 2: gs_worklistgs_run calls 1: gs_hash_node
114func gs_tab_has(tab: *i64, g: *EcoGraph, s: *u8) -> i64
124func gs_sib(g: *EcoGraph, idx: i64, suf: *u8, out: *u8) -> i64
called by 2: gs_worklistgs_run calls 1: gs_nlen
139func gs_read_bar(path: *u8) -> i64
called by 2: mainmain calls 2: sys_mmapsys_read_file
170func gs_worklist(storep: *u8, wantgen: i64, topn: i64, fd: i64) -> i64
260func gs_run(storep: *u8, bar: i64, fd: i64) -> i64
372func gs_atoi(s: *u8) -> i64
called by 1: main
379func main(argc: i64, argv: *i64) -> i64