code wiki / wiki / nx_wiki_status.nx

nx_wiki_status.nx

buildroot/runtime/wiki/nx_wiki_status.nx

16523 B271 linesdepth 10pulls 22 transitivereach 7 importersview sourcekind librarytopic wiki
docsdependenciesstructsconstsfunctions

about

nx_wiki_status.nx -- /wiki/status : the LIVE "distance to S-class" scorecard. SOVEREIGNTY MANDATE (operator, 2026-05-29): this page must be Nishi, bits-and-hardware-up -- NOT bash/sed/awk/TSV glue. The whole point of the page is to prove the sovereign stack is real; if it were generated by a shell pipeline parsing TSVs the medium would contradict the message. So: the scorecard data is Nishi data (in nx_sc_emit_html below), the aggregation/roll-up is computed in NishiLang, and the page is rendered by the wiki's own render primitives + served live by the Nishi wiki daemon at request time. Zero shell. Zero external lib. COMPOSES (per NISHI_SMALL_SHARP_COMPOSABLE_STANDARD; no new primitives): wiki/nx_wiki_doc_render NxWikiDocCtx + ctx_init + write_header (legacy header ships table CSS) + write_z + write_byte + write_footer COMPOSED BY: wiki/nx_wiki_routes dispatch GET /wiki/status FRESHNESS (honest): v1 embeds the latest 1:1-measured values (source: NX_PITWALL_MEASURED_BOARD_2026_05_29 + the daily gates) as the Nishi source of truth, replacing the prose board. v2 wires live reads from each bench's Nishi-written results store (still no shell/TSV). The page states its own provenance so freshness is never overclaimed. Hygiene per NISHI_CODE_HYGIENE_STANDARD: M2 every length checked vs cap; M3 every while bounded; M7 named caps; M8 every write rc checked + propagated (sealed verdict surface, no silent error). Status: V1. 2026-05-29.

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_wiki_doc_render.nx nx_wiki_status.nx nx_sites_daemon.nx nx_sites_daemon_v2.nx nx_wiki_routes.nx

imports: nx_syscalls.nxnx_wiki_doc_render.nx

imported by: nx_sites_daemon.nxnx_sites_daemon_v2.nxnx_wiki_routes.nx

structs

none

consts

36const NX_SC_OK: i64 = 0
37const NX_SC_OVERFLOW: i64 = 2800
40const NX_SC_RENDER_CAP: i64 = 262144 // 256 KB rendered HTML scratch
41const NX_SC_SCRATCH_CAP: i64 = 4096 // ctx scratch (>= 256 required)
42const NX_SC_STRLEN_CAP: i64 = 65536 // bounded strlen scan
43const NX_SC_PUTZ_CAP: i64 = 1048576 // bounded put_z scan
46const NX_SC_CLASSES: i64 = 6

functions

49func nx_sc_strlen(s: *u8) -> i64
61func nx_sc_put_z(dst: *u8, off: *i64, cap: i64, s: *u8) -> i64
78func nx_sc_emit_int(ctx: *NxWikiDocCtx, v: i64) -> i64
102func nx_sc_emit_row(ctx: *NxWikiDocCtx, counts: *i64,
called by 1: nx_sc_emit_html calls 1: nx_wiki_doc_write_z
137func nx_sc_emit_html(ctx: *NxWikiDocCtx) -> i64
195func nx_wiki_status_handle(resp_buf: *u8, resp_cap: i64, out_resp_n: *i64) -> i64