code wiki / _hdl_build / nx_gap_to_queue.nx

nx_gap_to_queue.nx

buildroot/runtime/_hdl_build/nx_gap_to_queue.nx

7518 B151 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic gap
docsdependenciesstructsconstsfunctions

about

nx_gap_to_queue.nx -- AUTONOMOUS WORK GENERATOR (the Gartner/benchmark pattern: measure -> analyze -> the GAP becomes work, with no human pick). Reads the team's OWN evidence (knowledge/status/rung_grades.log) and turns every RED or ABSENT rung into a deterministic "close this rung" assignment appended to knowledge/registry/assignment_queue.tsv -- IDEMPOTENT (a GEN- CLOSE-RN id already present is skipped, so re-running every beat adds 0 dupes; a rung that goes GREEN stops generating). This is how the ecosystem grows itself: the same loop a future bench panel feeds (NishiLang-vs-C row LOSS -> a beat-C assignment) -- the grade IS the backlog. Emits GAPGEN rows to knowledge/status/gap_gen.log; exit 0 (a generator, not a gate). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_gap_to_queue.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 gq_read sys_openat_rd sys_read sys_close gq_w sys_write sys_exit sys_openat_append gq_grade gq_len gq_at gq_contains gq_len ↻ gq_at ↻ gq_wn sys_mmap ↻ sys_write ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_close ↻

structs

none

consts

13const K_MAGIC_524288: i64 = 524288
14const K_MAGIC_1048576: i64 = 1048576

functions

16func gq_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 }
called by 1: main calls 1: sys_write
17func gq_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
19func gq_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
29func gq_at(buf: *u8, n: i64, i: i64, pat: *u8, pl: i64) -> i64
called by 2: gq_containsgq_grade
36func gq_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: gq_containsgq_grade
38func gq_contains(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 2: gq_lengq_at
47func gq_grade(buf: *u8, n: i64, rname: *u8) -> i64
called by 1: main calls 2: gq_lengq_at
88func main() -> i64