code wiki / (root) / nx_idea_coverage.nx

nx_idea_coverage.nx

buildroot/runtime/nx_idea_coverage.nx

9696 B231 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic idea
docsdependenciesstructsconstsfunctions

about

nx_idea_coverage.nx -- the ATTRIBUTION COVERAGE census for the idea genealogy. AUTHOR=ORGAN, MEASURED (no self-assert): joins the TOP-DOWN idea_genealogy.tsv against the BOTTOM-UP node universe (lineage.tsv child ids + math_genealogy.tsv foundation ids) and reports, from real files only: - total_bu = number of bottom-up nodes (the attributable universe) - attributed_nodes = distinct bottom-up nodes that a SOURCED/credited idea row bridges to - coverage_permil = attributed_nodes / total_bu * 1000 - resolved_bridges = idea-row realized_in tokens that resolve into the bottom-up tree - pending_bridges = idea-row realized_in tokens that DON'T resolve yet = the no-orphans worklist (credit given now; each needs a lineage.tsv row authored to go live) Emits one IDEACOV-PENDING line per pending bridge (the claimable action) + a summary, to stdout and append-only to knowledge/status/idea_coverage.log. This is the genealogist spec's "actionable-coverage" rung made mechanical: the TREE's state IS the worklist. Sovereign syscalls only. module: nishi-core.genealogy.idea_coverage depends: nishi-core.genealogy.idea_genealogist capability: GENEALOGY license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_idea_coverage.nx

imports: nx_syscalls.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

main sys_mmap ic_load_field sys_mmap ↻ sys_openat_rd sys_read sys_close ic_field_tab ic_load_pairs sys_mmap ↻ sys_openat_rd ↻ sys_read ↻ sys_close ↻ ic_field_tab ↻ sys_openat_append ic_in_set ic_streq ic_pending ic_w sys_write sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real ic_summary ic_w ↻ ic_wn nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_close ↻ sys_exit

structs

none

consts

23const IC_MAGIC_1048576: i64 = 1048576
24const IC_MAGIC_1048575: i64 = 1048575
25const IC_MAGIC_2048: i64 = 2048
27const IC_IDEA: *u8 = "knowledge/registry/idea_genealogy.tsv"
28const IC_LIN: *u8 = "knowledge/registry/lineage.tsv"
29const IC_MATHG: *u8 = "knowledge/registry/math_genealogy.tsv"
30const IC_LOG: *u8 = "knowledge/status/idea_coverage.log"
31const IC_IDCAP: i64 = 64

functions

33func ic_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 2: ic_pendingic_summary calls 1: sys_write
38func ic_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: ic_summary calls 1: nxi_fd
40func ic_streq(a: *u8, b: *u8) -> i64
called by 1: ic_in_set
45func ic_in_set(arena: i64, cnt: i64, idcap: i64, name: *u8) -> i64
called by 1: main calls 1: ic_streq
52func ic_field_tab(buf: *u8, ls: i64, n: i64, fidx: i64, out: *u8, outcap: i64) -> i64
80func ic_load_field(path: *u8, fidx: i64, arena: i64, base: i64, idcap: i64, maxc: i64) -> i64
110func ic_load_pairs(path: *u8, a0: i64, a8: i64, idcap: i64, maxc: i64) -> i64
140func ic_pending(fd: i64, idea: *u8, tok: *u8) -> i64
called by 1: main calls 1: ic_w
146func ic_summary(fd: i64, total_bu: i64, attributed: i64, permil: i64, ideas: i64, resolved: i64, pending: i64, epoch: i64, ok: i64) -> i64
called by 1: main calls 2: ic_wic_wn
158func main() -> i64