code wiki / _hdl_build / nx_compare_feed_gate.nx

nx_compare_feed_gate.nx

buildroot/runtime/_hdl_build/nx_compare_feed_gate.nx

10732 B135 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic compare
docsdependenciesstructsconstsfunctions

about

nx_compare_feed_gate.nx -- teeth for nx_compare_feed_lib (ecosystem EC47, 2026-09-16): the /compare daily feed built from a FIXTURE root under /tmp/nx_compare_feed_gate/ (the gate-fixture law: scratch in /tmp/<gate>/, created at setup, never a production shard). Three boards are listed: alpha (three players, two spine days inside the window and one outside it, a malformed spine row, two log rows on different days, one carrying markup that must be escaped), beta (one spine day -> "first day on the map", no plan file), gamma (listed, no spine -> no item). Today is pinned to day 20712 (2026-09-16) so every date in the expectations is a known answer, not the clock. Every count the lib publishes is asserted against the fixture it was built from, the quadrant words are the map's own, and the negative control is an empty list that must still yield a well-formed, item-free feed. Declared in organ_gate.conf. expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_compare_feed_lib.nx nx_compare_feed_gate.nx

imports: nx_gate_verdict.nxnx_compare_feed_lib.nx

imported by: nobody (leaf or entry point)

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

main 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 ↻ gv_head gv_puts sys_write ↻ fg_mkdir fg_path fg_cat fg_write_c fg_path ↻ fg_slen fg_write fg_write_c ↻ fg_path ↻ gv_check gv_puts ↻ cf_build sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close

structs

none

consts

12const FG_ROOT: *u8 = "/tmp/nx_compare_feed_gate/" as *u8
13const FG_TODAY: i64 = 20712 // 2026-09-16
14const FG_MODE_DIR: i64 = 493
15const FG_MODE_FILE: i64 = 420
16const FG_OUT_CAP: i64 = 65536

functions

18func fg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
19func fg_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p }
called by 1: fg_path
20func fg_path(dst: *u8, rel: *u8) -> i64 { var o: i64 = fg_cat(dst, 0, FG_ROOT); o = fg_cat(dst, o, rel); dst[o] = 0 as u8; return o }
called by 3: fg_mkdirfg_write_cmain calls 1: fg_cat
21func fg_mkdir(rel: *u8) -> i64 { let p: *u8 = sys_mmap(512); fg_path(p, rel); let rc: i64 = sys_mkdir(p, FG_MODE_DIR); sys_munmap(p, 512); return rc }
called by 1: main calls 1: fg_path
23func fg_write_c(rel: *u8, body: *u8, comment_first: i64) -> i64
called by 2: fg_writemain calls 2: fg_pathfg_slen
39func fg_write(rel: *u8, body: *u8) -> i64 { return fg_write_c(rel, body, 0) }
called by 1: main calls 1: fg_write_c
40func fg_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: fg_slen
53func fg_count(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: fg_slen
65func fg_ends(hay: *u8, n: i64, tail: *u8) -> i64
called by 1: main calls 1: fg_slen
72func fg_same(a: *u8, b: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
74func main(argc: i64, argv: *i64) -> i64