nx_gen_ui_emit_lifecycle_test_20260907.nx
buildroot/runtime/nx_gen_ui_emit_lifecycle_test_20260907.nx
about
nx_gen_ui_emit.nx -- EMITS the /gen companion app page (elara_ui.html) from DATA (knowledge/gen_ui.conf).
gen G19 (2026-08-30, operator: "we should always be emitting our uis and web pages from the first byte up -- make
sure /gen isnt handcrafted"). The served page was a hand-authored file since seq264; this organ now OWNS it: every
string, default, endpoint, cadence and theme token is a conf row, the structure lives here, and nx_gen_ui_gate
proves (a) two emits are byte-identical, (b) required behaviours are present, (c) a missing key REFUSES by name and
writes nothing, (d) the SERVED file is the EMITTED file. Output carries the NX-DERIVED stamp so no reader mistakes it
for authored content. ASCII source: non-ASCII glyphs are HTML entities or JS String.fromCodePoint.
nx_gen_ui_emit <conf> <out.html> exit: 0 emitted | 2 usage | 3 REFUSED (missing keys, named) | 4 unreadable/write-fail
Contract symbol: gu_emit. license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 12 | const UE_MAXKEYS: i64 = 160 |
| 13 | const UE_CONF_CAP: i64 = 65536 |
| 14 | const UE_MISS_CAP: i64 = 4096 |
| 15 | const UE_MODE_FILE: i64 = 420 |
| 16 | const UE_EXIT_OK: i64 = 0 |
| 17 | const UE_EXIT_USAGE: i64 = 2 |
| 18 | const UE_EXIT_REFUSED: i64 = 3 |
| 19 | const UE_EXIT_IO: i64 = 4 |
| 20 | const UE_CH_PIPE: i64 = 124 |
| 21 | const UE_CH_HASH: i64 = 35 |
| 22 | const UE_CH_NL: i64 = 10 |
| 23 | const UE_CH_CR: i64 = 13 |
| 24 | const UE_CH_COMMA: i64 = 44 |
functions
| 26 | func ue_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 27 | func ue_w(fd: i64, s: *u8) -> i64 { sys_write(fd, s, ue_len(s)); return 0 } |
| 28 | func ue_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] == b[i] { if a[i] == (0 as u8) { return 1 } i = i + 1 } return 0 } called by 1: ue_get |
| 31 | func ue_parse(buf: *u8, n: i64, keys: *i64, vals: *i64) -> i64 called by 1: main |
| 61 | func ue_get(buf: *u8, keys: *i64, vals: *i64, nk: i64, key: *u8, miss: *i64, mlist: *u8) -> *u8 |
| 79 | func ue_text(fd: i64, s: *u8) -> i64 |
| 88 | func ue_local_href(s: *u8) -> i64 called by 1: gu_emit |
| 107 | func ue_options(fd: i64, csv: *u8) -> i64 |
| 124 | func gu_emit(fd: i64, buf: *u8, keys: *i64, vals: *i64, nk: i64, miss: *i64, mlist: *u8) -> i64 |
| 263 | func main(argc: i64, argv: *i64) -> i64 |