nx_research_river.nx
buildroot/runtime/nx_research_river.nx
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
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
structs
| none |
consts
| 42 | const RV_PLANE: *u8 = "knowledge/store/resbrief-" |
| 43 | const RV_RCAP: i64 = 262144 |
| 44 | const RV_HCAP: i64 = 524288 |
| 45 | const RV_NL: i64 = 10 |
| 46 | const RV_TAB: i64 = 9 |
| 47 | const RV_MAXCOL: i64 = 16 |
| 48 | const RV_PAIR: i64 = 2 |
| 49 | const RV_SPB: i64 = 256 |
| 50 | const RV_MAXST: i64 = 16 |
| 51 | const RV_STB: i64 = 256 |
| 52 | const RV_FLAGB: i64 = 64 |
| 53 | const RV_PATHB: i64 = 256 |
| 54 | const RV_C_AREA: i64 = 1 |
| 55 | const RV_C_SLUG: i64 = 2 |
| 56 | const RV_C_TITLE: i64 = 3 |
| 57 | const RV_C_DATE: i64 = 4 |
| 58 | const RV_C_STATUS: i64 = 5 |
| 59 | const RV_C_FORKS: i64 = 6 |
| 60 | const RV_C_SCOPE: i64 = 7 |
| 61 | const RV_NCOL: i64 = 8 |
| 62 | const RV_MODE: i64 = 0x1a4 |
| 63 | const RV_ERRFD: i64 = 2 |
| 64 | const RV_EXIT_IO: i64 = 1 |
| 65 | const RV_EXIT_USAGE: i64 = 2 |
| 66 | const RV_EXIT_EMPTY: i64 = 3 |
| 67 | const RV_EXIT_NOAREA: i64 = 4 |
| 68 | const RV_LT: i64 = 60 |
| 69 | const RV_GT: i64 = 62 |
| 70 | const RV_AMP: i64 = 38 |
functions
| 72 | func rv_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 73 | func rv_werr(s: *u8) -> i64 { sys_write(RV_ERRFD, s, rv_slen(s)); return 0 } |
| 75 | func rv_slice_eqs(q: *u8, a: i64, b: i64, s: *u8) -> i64 |
| 82 | func rv_slice_eq(q: *u8, a: i64, b: i64, r: *u8, c: i64, d: i64) -> i64 called by 1: main |
| 88 | func rv_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64 called by 1: main |
| 103 | func rv_cat_slice(d: *u8, o: i64, q: *u8, a: i64, b: i64) -> i64 called by 1: main |
| 111 | func rv_cat_esc(d: *u8, o: i64, q: *u8, a: i64, b: i64) -> i64 |
| 125 | func main(argc: i64, argv: *i64) -> i64 |