code wiki / (root) / nx_ladder_gate.nx

nx_ladder_gate.nx

buildroot/runtime/nx_ladder_gate.nx

14465 B172 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic ladder
docsdependenciesstructsconstsfunctions

about

nx_ladder_gate.nx -- GATE for the ladder ruler (nx_ladder_lib), driven IN-PROCESS on planted plan rows: a fully declared ladder (two dated targets, every rung placed, every role counted), a plan with rungs but no targets (NO-LADDER, labeled not refused), a target whose bar row does not exist (UNDATED), a target with an unknown class, a rung with no rungrole row, a rung with an unknown role, a rungrole row naming an undeclared target, a board with only best-in-class, an orphan rungrole row naming no rung, a target id declared twice, a rung placed twice (a duplicate role, counted apart from orphans), NUL-terminated lines as the ranker hands them over, and a mixed board whose partition must sum. Every fixture asserts its own condition first. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_barfresh_lib.nx nx_ladder_lib.nx nx_gate_verdict.nx nx_ladder_gate.nx

imports: nx_syscalls.nxnx_barfresh_lib.nxnx_ladder_lib.nxnx_gate_verdict.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 ↻ sys_mmap ↻ g_run sys_mmap ↻ ld_classify sys_mmap ↻ bf_count_rows bf_line_end bf_line_starts bf_line_end ↻ bf_line_starts ↻ bf_field ld_class_code ld_span_is bf_slen ld_bar_exists sys_mmap ↻ bf_line_end ↻ bf_line_starts ↻ bf_field ↻ bf_span_eq

structs

none

consts

13const G_I64: i64 = 8
14const G_MAX: i64 = 8
15const G_FULL: *u8 = "sotabar|B1|2026-08|absa|what august says|k1|note\nsotabar|B2|2026-07|dim|what july says|k2|note\nsotatarget|T-BIC|best-in-class|B1|fine-tuned encoders and LLMs|k1\nsotatarget|T-FR|frontier|B2|generative quads and dimensional VA|k2\nrung|R1|the ruler|sym1|d|Organ|1|-\nrung|R2|the arm|sym2|d|Organ|1|R1\nrung|R3|the contender|sym3|d|Organ|1|R1,R2\nrung|R4|the old target|sym4|d|Organ|1|-\nrungrole|R1|substrate|T-FR|the frontier scores on it\nrungrole|R2|arm|T-FR|triangulates the frontier\nrungrole|R3|contender|T-BIC|its done-rule is a number against best in class\nrungrole|R4|superseded|T-BIC|kept as capability, retired as a claim\n"
16const G_FULL_RUNGS: i64 = 4
17const G_FULL_TARGETS: i64 = 2
18const G_NOLADDER: *u8 = "rung|R1|the ruler|sym1|d|Organ|1|-\nlog|1|R1|measure|no targets declared\n"
19const G_UNDATED: *u8 = "sotatarget|T-BIC|best-in-class|B9|no such bar|k1\nsotatarget|T-FR|frontier|B9|no such bar either|k2\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|substrate|T-FR|why\n"
20const G_BADCLASS: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-X|leader|B1|an unknown class|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|substrate|T-FR|why\n"
21const G_UNPLACED: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrung|R2|r|s|d|Organ|1|R1\nrungrole|R1|substrate|T-FR|why\n"
22const G_BADROLE: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|helper|T-FR|an unknown role\n"
23const G_BADTARGET: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|arm|T-NOWHERE|names a target nobody declared\n"
24const G_ONLY_BIC: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|contender|T-BIC|why\n"
25const G_ORPHAN: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|arm|T-FR|why\nrungrole|Z9|arm|T-FR|a rung that does not exist\n"
26const G_MIXED: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrung|R2|r|s|d|Organ|1|-\nrung|R3|r|s|d|Organ|1|-\nrung|R4|r|s|d|Organ|1|-\nrungrole|R1|substrate|T-FR|why\nrungrole|R2|helper|T-FR|bad role\nrungrole|R3|arm|T-GONE|bad target\n"
27const G_MIXED_RUNGS: i64 = 4
30const G_DUPTARGET: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nsotatarget|T-FR|frontier|B1|declared twice|k1\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|contender|T-FR|why\n"
31const G_DUPTARGET_TARGETS: i64 = 3
32const G_DUPROLE: *u8 = "sotabar|B1|2026-08|s|says|k1|n\nsotatarget|T-BIC|best-in-class|B1|ok|k1\nsotatarget|T-FR|frontier|B1|ok|k1\nrung|R1|r|s|d|Organ|1|-\nrungrole|R1|contender|T-FR|why\nrungrole|R1|arm|T-BIC|the same rung placed twice\n"
33const G_DUPROLE_ROWS: i64 = 2
34const G_RULE_TARGET_DUP: *u8 = "TARGET-DUPLICATE"
35const G_RULE_ROLE_DUP: *u8 = "ROLE-DUPLICATE"
36const G_RULE_NONE: *u8 = "NONE"

functions

39func g_str_is(a: *u8, b: *u8) -> i64
called by 1: main calls 1: bf_slen
47func g_copy(src: *u8) -> *u8
called by 1: main calls 2: bf_slensys_mmap
57func g_run(fx: *u8, n: i64, c: *i64, p0: *i64, t0: *i64, roles: *i64, states: *i64) -> i64
called by 1: main calls 2: sys_mmapld_classify
71func main() -> i64