code wiki / _hdl_build / nx_backlog_gen.nx

nx_backlog_gen.nx

buildroot/runtime/_hdl_build/nx_backlog_gen.nx

10274 B282 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic backlog
docsdependenciesstructsconstsfunctions

about

nx_backlog_gen.nx -- X-Q-001 (w9, Q-arc): THE QUEUE FEEDS ITSELF. v2: walks knowledge/registry/census_set.tsv (path \t rung per row) so ONE organ serves every census. Each census file (contract: status \t feature \t union \t evidence) contributes GEN-<rung>-<feature> queue rows for ABSENT|TOY entries, IDEMPOTENT per file (substring probe "\nGEN-<rung>-<feature>\t" against a fresh queue read). Rows append in ONE write each (no torn rows vs concurrent beats); trailing-newline guarded. Per-file evidence: CENSUS file=<path> rung=<rung> features=N verdict=GREEN; total: BACKLOGGEN files= generated= skipped= verdict=. A missing census file logs RED for that row and the roster continues (fail-loud, no livelock); total verdict RED if any file failed. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_backlog_gen.nx

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

main sys_mmap bg_read_all sys_openat_rd sys_read sys_close bg_w sys_write sys_exit sys_openat_append bg_find bg_gen_one bg_read_all ↻ bg_w ↻ sys_openat_append ↻ sys_mmap ↻ sys_write ↻ bg_find ↻ bg_status_pfx bg_appc bg_app bg_appr bg_has sys_close ↻ bg_wn sys_write ↻ sys_mmap ↻ bg_wn ↻ sys_close ↻

structs

none

consts

14const BG_MAGIC_65535: i64 = 65535
15const BG_MAGIC_1000000: i64 = 1000000
16const BG_MAGIC_8192: i64 = 8192
17const BG_MAGIC_65536: i64 = 65536
18const BG_MAGIC_2048: i64 = 2048
19const BG_MAGIC_8191: i64 = 8191
21const BG_SET: *u8 = "knowledge/registry/census_set.tsv"
22const BG_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv"
23const BG_LOG: *u8 = "knowledge/status/backlog_gen.log"
24const BG_MODE: i64 = 420
29const BG_QCAP: i64 = 8388608

functions

31func bg_w(fd: i64, s: *u8) -> i64
called by 2: bg_gen_onemain calls 1: sys_write
38func bg_wn(fd: i64, n: i64) -> i64
called by 2: bg_gen_onemain calls 2: sys_writesys_mmap
49func bg_read_all(path: *u8, buf: *u8, cap: i64) -> i64
63func bg_app(buf: *u8, off: i64, s: *u8) -> i64
called by 1: bg_gen_one
70func bg_appc(buf: *u8, off: i64, c: i64) -> i64
called by 1: bg_gen_one
75func bg_appr(buf: *u8, off: i64, src: *u8, a: i64, b: i64) -> i64
called by 1: bg_gen_one
82func bg_has(hay: *u8, hn: i64, nd: *u8, na: i64, nb: i64) -> i64
called by 1: bg_gen_one
98func bg_find(buf: *u8, from: i64, lim: i64, c: i64) -> i64
called by 2: bg_gen_onemain
109func bg_status_pfx(cbuf: *u8, ls: i64, le: i64) -> i64
called by 1: bg_gen_one
128func bg_gen_one(cpath: *u8, rung: *u8, cbuf: *u8, qbuf: *u8, row: *u8, lfd: i64) -> i64
212func main() -> i64