code wiki / _hdl_build / nx_competitive_census.nx

nx_competitive_census.nx

buildroot/runtime/_hdl_build/nx_competitive_census.nx

10172 B208 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic competitive
docsdependenciesstructsconstsfunctions

about

nx_competitive_census.nx -- X-CENSUS-001/002/003 (CALLOUT-012, operator 2026-06-13 ANTI-CHEAT law). The TEAM authors its own competitive census. v3 (MANHEIM-CENSUS-001): CONF-DRIVEN over MANY incumbents (epigenetics applied to the census itself -- add a competitive_census.conf row = a new competitive census, ZERO rebuild). Each conf row "C <name> <ref> <out>": - reads the feature surface from <ref> (bench-reference DATA = the QUESTIONS: feature\tprobe\tunion; growable, no recompile to add a feature), - COMPUTES each STATUS (the ANSWER) via re_has against the SHARED nx_ecosystem_test self-model (the ecosystem's own attestation of what it has PROVEN) -- NEVER tutor-asserted, - WRITES the census file <out> itself via sys_openat_wr (retires the tutor stdout-redirect), - emits one CENSUSGATE name=<name> verdict line to stdout (the gate evidence nx_reconcile grades), - composes nx_benchmark (bm_is_valid completeness gate + honest bm_verdict, refuses cherry-pick). Self-validating: pos control "divider" MUST compute PRESENT, neg control MUST be ABSENT, else RED. Argv-free: the sovereign build/run lane drops argv, so CC_CONF is the contract (constant path). NEXT SLICE (X-CENSUS-003): fetch the LIVE incumbent surface via nx_browse_text (blocked on the external-HTTPS TLS-FIN path X-B1-FIN-001; local-HTTP fetch is the proven bridge). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_research_extract.nx nx_benchmark.nx nx_competitive_census.nx

imports: nx_syscalls.nxnx_research_extract.nxnx_benchmark.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 cc_read_file sys_openat_rd sys_read sys_close cc_msg cc_fw sys_write re_has re_find re_strlen sys_openat_append cc_scan_to cc_scan_ws cc_one sys_mmap ↻ cc_read_file ↻ cc_w2 cc_fw ↻ cc_scan_to ↻ cc_app re_has ↻ sys_openat_wr sys_write ↻ sys_close ↻ bm_is_valid bm_completeness bm_verdict cc_n2 cc_fn sys_mmap ↻ sys_write ↻ cc_vstr cc_w2 ↻ cc_n2 ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_close ↻

structs

none

consts

19const CC_MAGIC_80000: i64 = 80000
20const CC_MAGIC_300000: i64 = 300000
21const CC_MAGIC_200000: i64 = 200000
22const CC_MAGIC_65536: i64 = 65536
23const CC_MAGIC_65520: i64 = 65520
25const CC_SELF: *u8 = "runtime/_hdl_build/nx_ecosystem_test.nx"
26const CC_CONF: *u8 = "knowledge/registry/competitive_census.conf"
27const CC_LOG: *u8 = "knowledge/status/competitive_census.log"
28const CC_MAXF: i64 = 256

functions

30func cc_fw(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 2: cc_msgcc_w2 calls 1: sys_write
31func cc_fn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; 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); 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 2: cc_putncc_n2 calls 2: sys_mmapsys_write
32func cc_msg(s: *u8) -> i64 { return cc_fw(1, s) }
called by 1: main calls 1: cc_fw
33func cc_putn(v: i64) -> i64 { return cc_fn(1, v) }
calls 1: cc_fn
35func cc_w2(lfd: i64, s: *u8) -> i64 { cc_fw(1, s); if lfd >= 0 { cc_fw(lfd, s) } return 0 }
called by 2: cc_onemain calls 1: cc_fw
36func cc_n2(lfd: i64, v: i64) -> i64 { cc_fn(1, v); if lfd >= 0 { cc_fn(lfd, v) } return 0 }
called by 2: cc_onemain calls 1: cc_fn
38func cc_read_file(path: *u8, buf: *u8, cap: i64) -> i64
53func cc_scan_to(buf: *u8, n: i64, start: i64, delim: i64) -> i64
called by 2: cc_onemain
61func cc_scan_ws(buf: *u8, n: i64, start: i64) -> i64
called by 1: main
72func cc_app(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: cc_one
75func cc_vstr(v: i64) -> *u8
called by 1: cc_one
86func cc_one(name: *u8, ref: *u8, out: *u8, sm: *u8, smn: i64, lfd: i64) -> i64
152func main() -> i64