nx_refcorpus.nx
buildroot/runtime/nx_refcorpus.nx
about
nx_refcorpus.nx -- THE MEASURED-FACTS PLANE + ITS ADMISSION CONTRACT.
WHY THIS EXISTS. The Reciprocal Corpus Program (published 2026-08-04 at
/code/research_reciprocal_corpus_program) makes two promises in public:
(1) we retain ZERO asset bytes from any reference corpus -- only measurements;
(2) we publish only AGGREGATE statistics, never anything reconstructable to one creator.
A promise in prose is worth nothing. This organ is where those promises become MECHANICAL:
every fact entering the corpus store passes an admission contract that REFUSES anything that
could carry asset payload or describe too few sources, and the gate proves the refusals fire.
★THE CORE INSIGHT: a measurement is SMALL AND PLAIN. A vertex count, a texel resolution, a
slider mean -- these are short numeric or short-label values. Asset payload (base64 texture,
mesh blob, embedded binary) is LONG or NON-PLAIN. So an admission rule of "short + plain +
declared sample size" is not a heuristic dressed as a guarantee: it is a structural wall that
a payload cannot pass through while every legitimate measurement passes trivially.
ROW SHAPE (append-only journal; a journal, not a registry -- ws_sync.jrnl precedent):
epoch <TAB> source <TAB> fact_key <TAB> value <TAB> unit <TAB> n <TAB> provenance <TAB> license
nx_refcorpus put <source> <fact_key> <value> <unit> <n> <provenance> <license>
nx_refcorpus admit <value> <n> -- dry-run the contract, print the verdict
nx_refcorpus list [max]
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 1 imports · 5 importers
imports: nx_syscalls.nx
imported by: nx_mediafacts.nxnx_mediafacts_gate.nxnx_modelfacts.nxnx_refcorpus_gate.nxnx_varfacts.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 26 | const RC_MAGIC_1024: i64 = 1024 |
| 28 | const RC_JRNL: *u8 = "knowledge/status/refcorpus.jrnl" |
| 31 | const RC_MAX_VAL: i64 = 64 |
| 32 | const RC_MAX_FIELD: i64 = 160 |
| 36 | const RC_KMIN: i64 = 8 |
| 37 | const RC_MODE: i64 = 0x1a4 |
| 38 | const RC_EXIT_USAGE: i64 = 2 |
| 39 | const RC_EXIT_REFUSED: i64 = 5 |
| 40 | const RC_EXIT_IO: i64 = 1 |
functions
| 42 | func rc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 43 | func rc_w(s: *u8) -> i64 { sys_write(1, s, rc_slen(s)); return 0 } |
| 44 | func rc_e(s: *u8) -> i64 { sys_write(2, s, rc_slen(s)); return 0 } |
| 45 | func rc_num(v: i64) -> i64 |
| 58 | func rc_atoi(s: *u8) -> i64 called by 1: main |
| 81 | func rc_admit(value: *u8, n: i64) -> i64 |
| 106 | func rc_reason(code: i64) -> i64 |
| 114 | func rc_apps(buf: *u8, p: i64, s: *u8) -> i64 called by 1: rc_put_row |
| 120 | func rc_appn(buf: *u8, p: i64, v: i64) -> i64 |
| 138 | func rc_put_row(src: *u8, key: *u8, val: *u8, unit: *u8, n: i64, prov: *u8, lic: *u8) -> i64 |
| 186 | func main(argc: i64, argv: *i64) -> i64 |