code wiki / _hdl_build / nx_compare_feed_gate.nx
nx_compare_feed_gate.nx
buildroot/runtime/_hdl_build/nx_compare_feed_gate.nx
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
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
structs
| none |
consts
| 12 | const FG_ROOT: *u8 = "/tmp/nx_compare_feed_gate/" as *u8 |
| 13 | const FG_TODAY: i64 = 20712 // 2026-09-16 |
| 14 | const FG_MODE_DIR: i64 = 493 |
| 15 | const FG_MODE_FILE: i64 = 420 |
| 16 | const FG_OUT_CAP: i64 = 65536 |
functions
| 18 | func fg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 19 | func 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 |
| 20 | func 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 } |
| 21 | func 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 } |
| 23 | func fg_write_c(rel: *u8, body: *u8, comment_first: i64) -> i64 |
| 39 | func fg_write(rel: *u8, body: *u8) -> i64 { return fg_write_c(rel, body, 0) } |
| 40 | func fg_find(hay: *u8, n: i64, needle: *u8) -> i64 |
| 53 | func fg_count(hay: *u8, n: i64, needle: *u8) -> i64 |
| 65 | func fg_ends(hay: *u8, n: i64, tail: *u8) -> i64 |
| 72 | func 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 } |
| 74 | func main(argc: i64, argv: *i64) -> i64 |