code wiki / (root) / nx_research_river.nx

nx_research_river.nx

buildroot/runtime/nx_research_river.nx

20905 B349 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic research
docsdependenciesstructsconstsfunctions

about

nx_research_river.nx -- EMIT ONE AREA'S RESEARCH INDEX FROM THE REGISTRY. The ocean (/wiki/research) has been generated from the `resbrief-` plane since 2026-08-01, but every RIVER -- /code/research, /product/research -- was still a HAND-EDITED page. On 2026-08-02 that bill came due twice, in OPPOSITE directions: * the HAND page was STALE: three briefs published that day were registered and rendered into the ocean, while /code/research (the page a reader of the code wiki actually lands on) still listed the older set and knew nothing about them; * the REGISTRY was WRONG: five briefs whose pages had been written and were being served (research_agentmem, research_codequality, research_perfmath, research_modeltier, research_foodchem) still carried status=STUB and, in the slug column, their CORPUS SOURCE FILENAME rather than their served page name. The ocean therefore rendered five live briefs as unlinked corpus-only stubs. THE LAW THIS ORGAN IS BUILT AROUND: A GENERATED INDEX INHERITS ITS REGISTRY'S ERRORS AND LAUNDERS THEM AS AUTHORITY. Generation does not create truth; it propagates whatever the registry says, at machine speed and with a machine's air of correctness. Replacing a hand-edited index with a generated one is only an improvement AFTER the registry is proven a superset of the page it replaces -- which is why the five rows above were repaired against the filesystem (the oracle for what is actually served) BEFORE this organ was allowed to overwrite anything. nx_research_river <area> -- writes sites/nishifamily/<area>/research.html Sections are the DISTINCT STATUS values in first-seen order, exactly as the ocean sections by distinct AREA. A new status appears by adding a plane row -- no organ edit. That is what recovers the hand page's Published / Maps / In-progress grouping without hardcoding a status list that would silently drop any status nobody thought of. Reads with sts_load_honest, NEVER plain sts_load: a stale declared count silently truncates the plain loader, and an index that under-reports its own library is indistinguishable from a complete one. Declared / loaded / in-area / rendered / beyond are printed AND rendered on the page, so a READER can see partial coverage, not just whoever ran the organ. Plane row (8 col): id area slug title date status forks_off scope license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_store_seed_lib.nx nx_seg_store.nx nx_syscalls.nx nx_research_river.nx

imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rv_werr sys_write rv_slen sys_exit sts_mm sys_mmap sts_werr sys_write ↻ sys_exit ↻ sts_load_honest ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq

structs

none

consts

42const RV_PLANE: *u8 = "knowledge/store/resbrief-"
43const RV_RCAP: i64 = 262144
44const RV_HCAP: i64 = 524288
45const RV_NL: i64 = 10
46const RV_TAB: i64 = 9
47const RV_MAXCOL: i64 = 16
48const RV_PAIR: i64 = 2
49const RV_SPB: i64 = 256
50const RV_MAXST: i64 = 16
51const RV_STB: i64 = 256
52const RV_FLAGB: i64 = 64
53const RV_PATHB: i64 = 256
54const RV_C_AREA: i64 = 1
55const RV_C_SLUG: i64 = 2
56const RV_C_TITLE: i64 = 3
57const RV_C_DATE: i64 = 4
58const RV_C_STATUS: i64 = 5
59const RV_C_FORKS: i64 = 6
60const RV_C_SCOPE: i64 = 7
61const RV_NCOL: i64 = 8
62const RV_MODE: i64 = 0x1a4
63const RV_ERRFD: i64 = 2
64const RV_EXIT_IO: i64 = 1
65const RV_EXIT_USAGE: i64 = 2
66const RV_EXIT_EMPTY: i64 = 3
67const RV_EXIT_NOAREA: i64 = 4
68const RV_LT: i64 = 60
69const RV_GT: i64 = 62
70const RV_AMP: i64 = 38

functions

72func rv_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: rv_werrrv_slice_eqs
73func rv_werr(s: *u8) -> i64 { sys_write(RV_ERRFD, s, rv_slen(s)); return 0 }
called by 1: main calls 2: sys_writerv_slen
75func rv_slice_eqs(q: *u8, a: i64, b: i64, s: *u8) -> i64
called by 1: main calls 1: rv_slen
82func rv_slice_eq(q: *u8, a: i64, b: i64, r: *u8, c: i64, d: i64) -> i64
called by 1: main
88func rv_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 1: main
103func rv_cat_slice(d: *u8, o: i64, q: *u8, a: i64, b: i64) -> i64
called by 1: main
111func rv_cat_esc(d: *u8, o: i64, q: *u8, a: i64, b: i64) -> i64
called by 1: main calls 1: ss_cat
125func main(argc: i64, argv: *i64) -> i64