code wiki / (root) / nx_models_page_emit.nx

nx_models_page_emit.nx

buildroot/runtime/nx_models_page_emit.nx

20985 B426 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_models_page_emit.nx -- THE /world/models GALLERY IS EMITTED, NEVER HAND-WRITTEN (2026-08-23). Until now the models page was a hand-maintained served file (proven: zero emitter matches over 23,108 sources, corpus_complete=1) -- every new rig cost a hand edit and the numbers could drift from the assets with nothing to catch it. This organ owns the page: data knowledge/models_page.rows (one row per card: id|artifact|png|title|suffix|bodyhtml) chrome knowledge/models_page.tmpl (head/css/lead/footer with @TOKENS@) numbers MEASURED on every emit -- it forks _offc/nx_rigfloor.elf derive over the cards' own artifact column (composing THE ruler, never a second measurement path) and refuses to emit any card whose artifact it could not measure. The floor footer reads knowledge/rigfloor.conf, the same conf the floor gate enforces -- one owner per number. A new rig is ONE data row. The page cannot drift from the assets because it is re-measured. FAIL-CLOSED: empty rows REFUSE (an empty gallery would silently unpublish every model); a malformed row REFUSES BY LINE; a truncated derive capture REFUSES; the write is atomic (tmp + renameat) so the served page is never half-written. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gatekit_lib.nx nx_imgattr_lib.nx nx_models_page_emit.nx

imports: nx_syscalls.nxnx_gatekit_lib.nxnx_imgattr_lib.nx

imported by: nobody (leaf or entry point)

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

main mpe_usage mpe_out gk_say gk_write_all sys_write gk_len 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_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close mpe_refuse mpe_out ↻ gk_eol mpe_say_kv sys_mmap ↻ gk_cat gk_catn sys_mmap ↻ gk_say ↻ gk_mkdir sys_mkdir

structs

none

consts

22const MPE_EXIT_OK: i64 = 0
23const MPE_EXIT_USAGE: i64 = 2
24const MPE_EXIT_UNOBS: i64 = 3
26const MPE_A_NL: i64 = 10
27const MPE_A_CR: i64 = 13
28const MPE_A_HASH: i64 = 35
29const MPE_A_PIPE: i64 = 124
30const MPE_A_AT: i64 = 64
31const MPE_A_LT: i64 = 60
32const MPE_A_BANG: i64 = 33
33const MPE_A_DASH: i64 = 45
34const MPE_A_GT: i64 = 62
35const MPE_A_SP: i64 = 32
36const MPE_A_EQ: i64 = 61
37const MPE_A_D0: i64 = 48
38const MPE_A_D9: i64 = 57
42const MPE_MAX_ROWS: i64 = 256
43const MPE_FIELDS: i64 = 6
45const MPE_OUT_CAP: i64 = 1048576
48const MPE_DERIVE_CAP: i64 = 262144
49const MPE_WORD: i64 = 8
50const MPE_PATH_CAP: i64 = 4096
52const MPE_DEF_ROWS: *u8 = "knowledge/models_page.rows"
53const MPE_DEF_OUT: *u8 = "sites/nishifamily/world/models.html"
54const MPE_TMPL: *u8 = "knowledge/models_page.tmpl"
55const MPE_FLOOR: *u8 = "knowledge/rigfloor.conf"
56const MPE_RIGFLOOR: *u8 = "_offc/nx_rigfloor.elf"
57const MPE_TMP_DIR: *u8 = "/tmp/nx_models_page_emit"
58const MPE_TMP_ROSTER: *u8 = "/tmp/nx_models_page_emit/roster"
59const MPE_TMP_FCONF: *u8 = "/tmp/nx_models_page_emit/floor_scratch.conf"

functions

61func mpe_out(s: *u8) -> i64 { gk_say(s, gk_len(s)); return 0 }
63func mpe_say_kv(k: *u8, v: i64) -> i64
called by 1: main calls 4: sys_mmapgk_catgk_catngk_say
73func mpe_find(hay: *u8, hn: i64, from: i64, ned: *u8) -> i64
called by 1: main calls 1: gk_len
89func mpe_num_at(b: *u8, n: i64, pos: i64) -> i64
called by 2: mpe_conf_i64main
102func mpe_conf_i64(buf: *u8, n: i64, key: *u8) -> i64
called by 1: main calls 2: gk_lenmpe_num_at
127func mpe_ap(out: *u8, pos: i64, s: *u8, cap: i64) -> i64
called by 2: mpe_stampmain calls 2: gk_lengk_cat
134func mpe_apn(out: *u8, pos: i64, v: i64, cap: i64) -> i64
called by 1: main calls 1: gk_catn
142func mpe_stamp(out: *u8, pos: i64, cap: i64) -> i64
called by 1: main calls 1: mpe_ap
163func mpe_tok(t: *u8, tn: i64, i: i64, name: *u8) -> i64
called by 1: main calls 1: gk_len
175func mpe_usage() -> i64
called by 1: main calls 1: mpe_out
180func mpe_refuse(why: *u8) -> i64
called by 1: main calls 1: mpe_out
187func main(argc: i64, argv: *i64) -> i64