nx_compare_shared_fit_sota_20260910.nx
buildroot/runtime/nx_compare_shared_fit_sota_20260910.nx
about
nx_swcompare_sota_lib.nx -- THE SOTA FIELD AS ONE LIB PASS (2026-09-02, operator: "all the /compare on the same
emitted output, not random; if a previous compare had more capabilities bring it into the emitter").
WHY. Two generators emitted the /compare surface and their pages had drifted to two SHAPES: the ten sota-class
domains (any domain with a knowledge/compare/<dom>.sota) rendered the N-peer grade grid plus the shared passes,
and LACKED the Evidence profile, Do this next, Critical path and Capability matrix sections every matrix-class
page carries; the matrix-class pages lacked the grade grid. Measured on the live pages 2026-09-02 (lang vs
graphics). Since the grade grid, its measured bindings and its census were the ONLY capability the sota
generator had that the matrix generator did not, they move HERE as a pass the matrix generator composes when a
.sota exists -- absent file = byte-identical emit, the refs/gallery/bench precedent -- and every domain then
renders through ONE assembler. nx_swcompare_sota's page path becomes redundant by construction.
EVERYTHING THAT WAS MEASURED STAYS MEASURED, WITH THE SAME WORDS: the binding classes (CONSISTENT / STALE-UNDER /
UNBACKED refuses / UNRESOLVED / UNREADABLE), the `BIND:` census line, the per-row drift lines, the html badge
strings and the api.json field names are carried verbatim, because nx_sota_drift_gate asserts on those exact
bytes (it drives the promoted generator on a /tmp fixture tree) and a gate that has to be re-taught its subject's
vocabulary on every refactor is a gate that gets loosened.
THE DATA (unchanged): knowledge/compare/<dom>.sota
@title / @sub / @verdict / @cols Nishi|<c1>|..|<cM> / @cat <category>
<axis>|<kind num|g>|<v0>|..|<v(M-1)>[|=<symbol> or =<organ>:<symbol>]|<note>
API. sl_new() allocates the state; sl_load(domain, st) parses and measures (1 loaded . 0 no .sota . -1 empty);
sl_css(fd) the grid's type rules; sl_html(st, domain, fd) the section; sl_json(st, domain, fd) a `,"sota":{..}`
fragment (leading comma, caller places it before the ppp key); sl_census(st, domain, fd) the plain-mode lines,
returning 1 when the liar-kill passes and 0 when it refuses (the caller folds that into its own verdict).
license_tier: ORIGINAL Read-only. No hw writes (Rule 26).
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_compare_shared_fit_lib_20260910.nx
imported by: nx_compare_shared_fit_matrix_20260910.nx
structs
| 53 | struct SotaState |
consts
| 31 | const SL_HASH_SEED: i64 = 5381 |
| 32 | const SL_CAP: i64 = 262144 |
| 33 | const SL_MAXR: i64 = 96 |
| 34 | const SL_MAXF: i64 = 24 |
| 35 | const SL_STATE_BYTES: i64 = 1024 // SotaState is 36 words = 288 B; 1024 leaves room for fields added later |
| 36 | const SL_PATH: i64 = 512 |
| 37 | const SL_LIAR_COLS: i64 = 8 // the generator's liar-kill floors, unchanged: cols>=8 rows>=20 quantitative>=3 |
| 38 | const SL_LIAR_ROWS: i64 = 20 |
| 39 | const SL_LIAR_NUM: i64 = 3 |
| 40 | const SL_DRIFT_NONE: i64 = 0 |
| 41 | const SL_DRIFT_CONSISTENT: i64 = 1 |
| 42 | const SL_DRIFT_STALE_UNDER: i64 = 2 |
| 43 | const SL_DRIFT_UNBACKED: i64 = 3 |
| 44 | const SL_DRIFT_UNRESOLVED: i64 = 4 |
| 45 | const SL_DRIFT_UNREADABLE: i64 = 5 |
| 50 | const SL_DRIFT_UNSERVED: i64 = 6 |
| 51 | const SL_MEAS_UNRESOLVED: i64 = 0 - 2 |
functions
| 88 | func sl_src_hash(b: *u8, n: i64) -> i64 called by 1: sl_load |
| 95 | func sl_has(h: *u8, needle: *u8) -> i64 called by 1: sl_note_has_evidence |
| 112 | func sl_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: sl_has_ci |
| 113 | func sl_has_ci(hay: *u8, needle_lc: *u8) -> i64 |
| 134 | func sl_note_has_evidence(note: *u8) -> i64 |
| 143 | func sl_drift_name(d: i64) -> *u8 |
| 152 | func sl_drift_class(d: i64) -> *u8 called by 1: sl_html_heading |
| 159 | func sl_meas_name(m: i64) -> *u8 |
| 166 | func sl_new() -> *SotaState |
| 175 | func sl_load(domain: *u8, st: *SotaState) -> i64 |
| 327 | func sl_css(fd: i64) -> i64 |
| 342 | func sl_html(st: *SotaState, domain: *u8, fd: i64) -> i64 { return sl_html_heading(st, domain, fd, 2) } calls 1: sl_html_heading |
| 343 | func sl_html_heading(st: *SotaState, domain: *u8, fd: i64, heading_level: i64) -> i64 |
| 436 | func sl_json(st: *SotaState, domain: *u8, fd: i64) -> i64 |
| 486 | func sl_census(st: *SotaState, domain: *u8, fd: i64) -> i64 |