code wiki / _hdl_build / nx_queue_cohesion.nx
nx_queue_cohesion.nx
buildroot/runtime/_hdl_build/nx_queue_cohesion.nx
about
nx_queue_cohesion.nx -- X-CONS-003: the AUDITOR's anti-sprawl gate
(operator law 2026-06-11: "make sure we are cohesive always and avoid
sprawl and duplicative work" -- enforced mechanically every beat).
DUP-ID two queue rows with the same id -> RED (corruption)
DUP-TITLE two queue rows with byte-equal titles -> RED (sprawl)
LEDGERGAP open debt-ledger T#/B# ids with NO queue mention -> counted
(informational: gaps are WORK to route, not corruption;
X-CONS-002 is the sink that drives the count to 0)
Composes nx_assign_core (the queue parser) -- no second grammar.
argv[1]=queue override argv[2]=ledger override (gates use scratch)
Evidence: COHESION row -> stdout + knowledge/status/queue_cohesion.log.
Exit: 0 cohesive (gaps allowed), 1 dup found, 101 queue missing.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_assign_core.nxnx_itoa_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
| 17 | const K_MAGIC_1048576: i64 = 1048576 |
functions
| 19 | func qc_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 24 | func qc_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 27 | func qc_streq(a: *u8, b: *u8) -> i64 called by 1: qc_dup_titles |
| 37 | func qc_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 48 | func qc_has(hay: *u8, n: i64, pat: *u8) -> i64 called by 1: qc_ledger_gaps |
| 67 | func qc_dup_ids(cx: *i64, lfd: i64) -> i64 |
| 89 | func qc_dup_titles(cx: *i64, lfd: i64) -> i64 |
| 122 | func qc_ledger_gaps(ledger: *u8, ln: i64, qbuf: *u8, qn: i64, lfd: i64) -> i64 |
| 200 | func main(argc: i64, argv: *i64) -> i64 |