nx_compare_results_lib.nx
buildroot/runtime/nx_compare_results_lib.nx
about
nx_compare_results_lib.nx -- ONE HOME FOR A BOARD'S RESULTS (ecosystem EC64, 2026-09-17).
Operator 2026-09-17, asked where the twin renders could be seen: "i dont want them strewn about like we had with /world
pages". A board's results are DATA -- buildroot/knowledge/compare/<dom>.results -- and this lib renders them as ONE page,
/compare/<dom>/results/, grouped by kind, newest first, every image behind the estate's one click-to-open primitive
(nx_reveal_lib). A result row:
result|<slug>|<kind>|<YYYY-MM-DD>|<class>|<title>|<report href or ->|<image href or ->|<headline>
slug is the identity: a later row with the same slug SUPERSEDES the earlier one (history stays in the file, the page
shows the current one, and the receipt counts what was superseded). A row with the wrong field count is MALFORMED and
named by line number; it never becomes a card. No pipes in text fields.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 3 importers
imports: nx_syscalls.nxnx_reveal_lib.nx
imported by: nx_compare_results.nxnx_compare_results_gate.nxnx_twinreport_gate.nx
structs
| none |
consts
| 14 | const CRES_FIELDS: i64 = 9 |
| 15 | const CRES_F_TAG: i64 = 0 |
| 16 | const CRES_F_SLUG: i64 = 1 |
| 17 | const CRES_F_KIND: i64 = 2 |
| 18 | const CRES_F_DATE: i64 = 3 |
| 19 | const CRES_F_CLASS: i64 = 4 |
| 20 | const CRES_F_TITLE: i64 = 5 |
| 21 | const CRES_F_PAGE: i64 = 6 |
| 22 | const CRES_F_IMAGE: i64 = 7 |
| 23 | const CRES_F_HEAD: i64 = 8 |
| 24 | const CRES_TAG: *u8 = "result" |
| 25 | const CRES_NONE: *u8 = "-" |
| 26 | const CRES_I64: i64 = 8 |
| 27 | const CRES_MODE644: i64 = 420 |
| 29 | const CRES_ROW_W: i64 = 19 |
| 30 | const CRES_ROW_LIVE: i64 = 18 |
| 32 | const CRES_R_LINES: i64 = 0 |
| 33 | const CRES_R_ROWS: i64 = 1 |
| 34 | const CRES_R_MALFORMED: i64 = 2 |
| 35 | const CRES_R_SUPERSEDED: i64 = 3 |
| 36 | const CRES_R_LIVE: i64 = 4 |
| 37 | const CRES_R_KINDS: i64 = 5 |
| 38 | const CRES_R_OPEN: i64 = 6 |
| 39 | const CRES_R_CLICK: i64 = 7 |
| 40 | const CRES_R_GATED: i64 = 8 |
| 41 | const CRES_R_UNKNOWN: i64 = 9 |
| 42 | const CRES_R_ADULT: i64 = 10 |
| 43 | const CRES_R_BARE: i64 = 11 |
| 44 | const CRES_R_HTML_BYTES: i64 = 12 |
| 45 | const CRES_R_FIRST_BAD_LINE: i64 = 13 |
| 46 | const CRES_R_N: i64 = 14 |
| 47 | const CRES_E_READ: i64 = 0 - 3 |
| 48 | const CRES_E_NOROWS: i64 = 0 - 4 |
| 49 | const CRES_E_WRITE: i64 = 0 - 5 |
| 50 | const CRES_E_OVERFLOW: i64 = 0 - 6 |
| 51 | const CRES_E_BARE: i64 = 0 - 7 |
| 54 | const CRES_GROW: i64 = 6 |
| 55 | const CRES_PER_ROW: i64 = 2048 |
| 56 | const CRES_FIXED: i64 = 32768 |
| 57 | const CRES_PATHB: i64 = 1024 |
| 58 | const CRES_CH_HASH: i64 = 35 // the fragment mark, written as a byte: the lexer reads that character inside a literal as a comment |
functions
| 60 | func cres_streq_span(buf: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64 |
| 66 | func cres_span_cstr(buf: *u8, s: i64, e: i64) -> *u8 |
| 73 | func cres_count_lines(buf: *u8, n: i64) -> i64 |
| 82 | func cres_parse(buf: *u8, n: i64, rows: *i64, rep: *i64) -> i64 |
| 149 | func cres_f(out: *u8, o: i64, cap: i64, buf: *u8, rows: *i64, r: i64, f: i64) -> i64 |
| 152 | func cres_f_is_none(buf: *u8, rows: *i64, r: i64, f: i64) -> i64 |
| 156 | func cres_kind_first(buf: *u8, rows: *i64, nrows: i64, r: i64) -> i64 |
| 166 | func cres_kind_count(buf: *u8, rows: *i64, nrows: i64, r: i64) -> i64 |
| 177 | func cres_catn(out: *u8, o: i64, cap: i64, v: i64) -> i64 |
| 190 | func cres_card(out: *u8, o: i64, cap: i64, buf: *u8, rows: *i64, r: i64, pol: *u8, pn: i64, tally: *i64) -> i64 |
| 216 | func cres_any_adult(buf: *u8, rows: *i64, nrows: i64, pol: *u8, pn: i64) -> i64 |
| 230 | func cres_render(dom: *u8, buf: *u8, n: i64, pol: *u8, pn: i64, out: *u8, cap: i64, rep: *i64) -> i64 called by 3: maincres_emit_filemain calls 17: cres_count_linessys_mmapcres_parservl_tally_clearrvl_catrvl_cat_esc+11 |
| 320 | func cres_write(path: *u8, buf: *u8, n: i64) -> i64 |
| 336 | func cres_emit_file(dom: *u8, results_path: *u8, out_path: *u8, rep: *i64) -> i64 called by 1: crc_run calls 6: sys_mmapsys_read_filervl_policy_loadcres_count_linescres_rendercres_write |