code wiki / _hdl_build / nx_model_card.nx
nx_model_card.nx
buildroot/runtime/_hdl_build/nx_model_card.nx
about
nx_model_card.nx -- F785 THE SOVEREIGN MODEL CARD RENDERER (operator 2026-07-20: "model card like
Inkling with all the same measurements and breakdowns to comp as we build our capabilities against
these models ... nishi sovereign information plane ... emit and publish and host this card from the
first byte up natively as capability and keep it fresh").
PURE RENDERER: every byte of content comes from the sovereign plane knowledge/store/modelcard-
(25 bench + 10 property + 7 prose + 1 meta rows, hist- provenance) plus the LIVE measured
SWE-bench-analog source sites/nishifamily/compare/autograde/api.json -- the b05 NISHI cell is
substituted at emit time (keep-it-fresh from the source, never a frozen number).
HONESTY BY CONSTRUCTION: a NISHI cell renders MEASURED (green, live artifact) / ANALOG (orange,
not head-to-head) / UNMEASURED:F-rung (gray, harness filed) -- fabrication has no code path.
nx_model_card -> ATOMIC emit to sites/nishifamily/modelcard.html (beat mode)
nx_model_card emit <outpath> -> ATOMIC emit (tmp + renameat) to <outpath>
nx_model_card selftest -> in-memory emit + substring teeth, exit 0/3
ENVELOPE (declared): plane cap 1MiB, out cap 512KiB, 16-col rows; plane content is
operator-trusted (no HTML-escape pass; plane vocabulary carries no < > &).
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 5 imports · 0 importers
imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nxnx_estate_path.nxnx_html_head.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
| 23 | const MC_PREFIX: *u8 = "knowledge/store/modelcard-" as *u8 |
| 24 | const MC_APIJSON: *u8 = "sites/nishifamily/compare/autograde/api.json" as *u8 |
| 25 | const MC_NL: i64 = 10 |
| 26 | const MC_TAB: i64 = 9 |
| 27 | const MC_DASH: i64 = 45 |
| 28 | const MC_ZERO: i64 = 48 |
| 29 | const MC_NINE: i64 = 57 |
| 30 | const MC_BASE10: i64 = 10 |
| 31 | const MC_STDERR: i64 = 2 |
| 32 | const MC_PLANECAP: i64 = 1048576 |
| 33 | const MC_OUTCAP: i64 = 524288 |
| 34 | const MC_SLACK: i64 = 4096 |
| 35 | const MC_SPB: i64 = 256 |
| 36 | const MC_PAIR: i64 = 2 |
| 37 | const MC_NCOLMAX: i64 = 16 |
| 38 | const MC_MODE: i64 = 0x1a4 |
| 39 | const MC_TMPB: i64 = 28 |
| 40 | const MC_UCAP: i64 = 16 |
| 41 | const MC_PATHCAP: i64 = 512 |
| 42 | const MC_ANSOFF: i64 = 10 |
| 43 | const MC_GENOFF: i64 = 17 |
| 44 | const MC_C_AXIS: i64 = 1 |
| 45 | const MC_C_BENCH: i64 = 2 |
| 46 | const MC_C_UNIT: i64 = 3 |
| 47 | const MC_C_INK: i64 = 4 |
| 48 | const MC_C_MFIRST: i64 = 4 |
| 49 | const MC_C_MLAST: i64 = 12 |
| 50 | const MC_C_NISHI: i64 = 13 |
| 51 | const MC_C_NOTE: i64 = 14 |
| 52 | const MC_NCOL: i64 = 15 |
| 53 | const MC_IDX_VERB: i64 = 1 |
| 54 | const MC_IDX_OUT: i64 = 2 |
| 55 | const MC_ARGC_VERB: i64 = 2 |
| 56 | const MC_ARGC_OUT: i64 = 3 |
| 57 | const MC_S: i64 = 115 |
| 58 | const MC_EXIT_EMPTY: i64 = 1 |
| 59 | const MC_EXIT_SELF: i64 = 3 |
| 60 | const MC_MINBYTES: i64 = 12000 |
functions
| 62 | func mc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 63 | func mc_werr(s: *u8) -> i64 { sys_write(MC_STDERR, s, mc_slen(s)); return 0 } |
| 64 | func mc_puts(b: *u8, off: i64, s: *u8) -> i64 |
| 70 | func mc_putsl(b: *u8, off: i64, q: *u8, a: i64, e: i64) -> i64 |
| 76 | func mc_puti(b: *u8, off: i64, v: i64) -> i64 |
| 88 | func mc_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64 |
| 103 | func mc_seq(q: *u8, a: i64, b: i64, s: *u8) -> i64 |
| 110 | func mc_pfx(q: *u8, a: i64, b: i64, s: *u8) -> i64 |
| 117 | func mc_find(hay: *u8, n: i64, needle: *u8, from: i64) -> i64 |
| 130 | func mc_uint(buf: *u8, p: i64, n: i64) -> i64 called by 1: main |
| 145 | func mc_note(q: *u8, qn: i64, id: *u8, u: *i64) -> i64 |
| 160 | func mc_prose(out: *u8, o0: i64, q: *u8, qn: i64, id: *u8, hd: *u8) -> i64 |
| 173 | func mc_count(buf: *u8, n: i64, needle: *u8) -> i64 |
| 184 | func mc_nishi(out: *u8, o0: i64, q: *u8, a: i64, b: i64, lp: i64) -> i64 |
| 223 | func mc_axis(out: *u8, o0: i64, q: *u8, qn: i64, ax: *u8, hd: *u8, lp: i64) -> i64 |
| 265 | func mc_props(out: *u8, o0: i64, q: *u8, qn: i64) -> i64 |
| 296 | func main(argc: i64, argv: *i64) -> i64 |