code wiki / _hdl_build / nx_ims_corpus_refresh.nx

nx_ims_corpus_refresh.nx

buildroot/runtime/_hdl_build/nx_ims_corpus_refresh.nx

7298 B96 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic ims
docsdependenciesstructsconstsfunctions

about

nx_ims_corpus_refresh.nx -- rebuild the framed live-corpus snapshot knowledge/status/ims_live_corpus.txt from the CURRENT web_assets/*.html bytes (the exact bytes vpub publishes). Each page is framed "###PAGE /wiki/<slug>.html <blen>\n <body>" -- the SAME transport nx_wiki_walk_metrics / nx_ims_monitor read. This is the "refresh from live bytes before measuring" step the walkability rung requires; it must run AFTER the page emitters and BEFORE the walk gate so the gate measures the new tree. READ web_assets, WRITE the snapshot only (additive to the wiki; replaces the snapshot cache). Driven by a slug->file map so adding a page is a one-line data change. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_ims_corpus_refresh.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 cr_w sys_write cr_frame sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close cr_w ↻ cr_cat cr_catn sys_mmap ↻ cr_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_openat_wr sys_exit sys_write ↻ sys_close ↻ cr_num ↻

structs

none

consts

13const CR_OUT: *u8 = "knowledge/status/ims_live_corpus.txt"
14const CR_CAP: i64 = 4194304 // 4 MB (matches WM_MAX_BYTES)
15const CR_MODE: i64 = 0x1a4

functions

17func cr_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: cr_framemain calls 1: sys_write
22func cr_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: cr_framemain calls 1: nxi_out
23func cr_cat(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: cr_frame
24func cr_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: cr_frame calls 1: sys_mmap
33func cr_frame(dst: *u8, off: i64, slug: *u8, file: *u8) -> i64
52func main() -> i64