code wiki / (root) / nx_cap_census.nx

nx_cap_census.nx

buildroot/runtime/nx_cap_census.nx

40195 B624 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind tooltopic cap
docsdependenciesstructsconstsfunctions

about

nx_cap_census.nx -- THE NISHI CAPABILITY DRIVER (unified, measurement-first). ONE engine measures how SOTA any TARGET is, replacing the scattered per-lane census organs. Data-driven: a target T is defined by knowledge/registry/T_capabilities.conf (cols: feature<TAB>surface<TAB>status<TAB>file<TAB>marker<TAB>note); the set of targets is knowledge/registry/capability_targets.conf. SURFACES ARE DYNAMIC -- discovered from the rows, so each target brings its own taxonomy (torrent: acquire..ops; protocol: core..advanced; the next target: whatever it declares). LIAR-KILL: a HAVE/PARTIAL opens the repo-relative `file` and requires the `marker` substring present (marker "-"=existence-only); a missing file OR absent marker flips the claim to UNGROUNDED (counted as GAP + flagged) -- so a capability can never be asserted without the code on disk. nx_cap_census -> ECOSYSTEM SCOREBOARD: one SOTA line per target + the overall number nx_cap_census all -> same nx_cap_census <target> -> full per-surface census + gap roadmap (the build order to 1000) for one target Durable ecosystem log -> knowledge/status/capability_ecosystem_census.log. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_str.nx nx_itoa_lib.nx nx_syscalls.nx nx_flatstore_flip.nx nx_cap_census.nx

imports: nx_str.nxnx_itoa_lib.nxnx_syscalls.nxnx_flatstore_flip.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cap_self_locate sys_openat_rd sys_close sys_chdir sys_mmap sys_mmap ↻ cap_app sys_mkdir sys_mmap ↻ cap_streq cp sys_write nx_str_len sys_openat_rd ↻ sys_exit sys_read sys_close ↻ cap_conf_path cap_app ↻ cap_store_path cap_app ↻ fsf_migrate sys_mmap ↻ ss_readall sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read ↻ sys_close ↻ ss_begin ss_begin_cap sys_mmap ↻ fsf_key sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_commit

structs

none

consts

17const CAP_MAGIC_4096: i64 = 4096
18const CAP_MAGIC_65536: i64 = 65536
19const CAP_MAGIC_65000: i64 = 65000
20const CAP_MAGIC_131072: i64 = 131072
21const CAP_MAGIC_131000: i64 = 131000
22const CAP_MAGIC_200000: i64 = 200000
23const CAP_MAGIC_524288: i64 = 524288
24const CAP_MAGIC_20000: i64 = 20000
25const CAP_MAGIC_16384: i64 = 16384
26const CAP_MAGIC_16000: i64 = 16000
28const CAP_MANIFEST: *u8 = "knowledge/registry/capability_targets.conf"
29const CAP_ROWKEY: *u8 = "cap:row:"
30const CAP_ECOLOG: *u8 = "knowledge/status/capability_ecosystem_census.log"

functions

32func cp(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
37func cnum(v: i64) -> i64 { nxi_out(v); return 0 }
38func cwf(fd: i64, s: *u8) -> i64 { if fd>=0 { sys_write(fd, s, nx_str_len(s)) } return 0 }
43func cwn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 2: cap_verify_onemain calls 1: nxi_fd
45func cap_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if a[i]!=b[i] { return 0 } i=i+1 } if b[i]!=(0 as u8) { return 0 } return 1 }
46func cap_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 }
47func cap_field(buf: *u8, ls: i64, le: i64, n: i64, out: *u8) -> i64
56func cap_contains(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: cap_grounded
69func cap_grounded(file: *u8, marker: *u8, fbuf: *u8, fcap: i64) -> i64
79func cap_surf_reg(labs: *i64, nlab: *i64, s: *u8) -> i64
called by 1: cap_census_one calls 2: cap_streqsys_mmap
88func cap_pct(h: i64, p: i64, g: i64) -> i64 { let t: i64=h+p+g; if t<=0 { return 0 } return (h*2+p)*1000/(t*2) }
called by 1: cap_census_one
90func cap_find_after(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: cap_prev_score
102func cap_int_at(buf: *u8, n: i64, pos: i64) -> i64
called by 1: cap_prev_score
110func cap_prev_score(buf: *u8, n: i64, target: *u8) -> i64
116func cap_conf_path(target: *u8, out: *u8) -> i64
119func cap_srcs_path(target: *u8, out: *u8) -> i64
123func cap_store_path(target: *u8, out: *u8) -> i64
130func cap_self_locate(argv: *i64) -> i64
152func cap_count_sources(target: *u8) -> i64
168func cap_print_sources(target: *u8) -> i64
191func cap_census_one(target: *u8, detail: i64, fbuf: *u8, out4: *i64) -> i64
255func cap_probe_grounded(probe: *u8) -> i64
268func cap_gate_run(probe: *u8) -> i64
293func cap_num_app(dst: *u8, off: i64, v: i64) -> i64
called by 1: cap_verify_one calls 1: sys_mmap
303func cap_verify_one(target: *u8, detail: i64, out3: *i64) -> i64
347func cap_judge_one(target: *u8, detail: i64, out2: *i64) -> i64
382func main(argc: i64, argv: *i64) -> i64