code wiki / _hdl_build / _wiki_frontend_gate.nx
_wiki_frontend_gate.nx
buildroot/runtime/_hdl_build/_wiki_frontend_gate.nx
about
_wiki_frontend_gate.nx -- THE S-CLASS WIKI-FRONTEND GATE.
Re-proves, from a REAL run (never a fabricated GREEN), that the served wiki
page is world-class AND that the two render bugs are dead:
clean_ok the served nishi-canonical <meta> value contains ONLY a
valid canonical URL ("https://nishifamily.com/wiki/<slug>")
and NONE of the garbage bytes that the const-*u8-index bug
used to emit (we assert the exact clean URL is present AND
that no 0xEF/0xBF/0x00 byte sits inside the meta value).
title_ok the served <title> contains the CLEAN heading TEXT and does
NOT begin with a raw markdown '#'/"# " (the title-leak bug).
semantic_ok the served HTML contains <main and <article (HTML5 semantic
structure) -- the world-class chrome.
cite_wired_ok a page body with [[cite:<cid>]] citing a HOSTABLE archived
source renders the inline nx-cite card (the supporting-source
bytes appear INSIDE a <details ... nx-cite> block) -- the
cite pass that is wired into the render pipeline.
Judged on GROUND-TRUTH SUBSTRINGS in the actually-rendered HTML, never a bare
rc==const. The page render is driven DIRECTLY via nx_wiki_doc_handle (the same
handler the daemon forks) -- no live socket. The cite check seeds a fresh
per-run archive prefix (empty each run => idempotent, Rule 10).
Verdict line (stdout + knowledge/status/wiki_frontend_gate.log):
WIKIFRONTEND clean_ok=<0|1> title_ok=<0|1> semantic_ok=<0|1> cite_wired_ok=<0|1> verdict=GREEN|RED
Pure NishiLang, NO SQL, NO .sh/.py/.js, no new .tsv/.conf. nx_sites_daemon
UNTOUCHED. license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_wiki_index_builder.nxnx_wiki_content_loader.nxnx_wiki_doc_handler.nxnx_wiki_cite_render.nxnx_artifact_store.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
| 37 | const WFG_LOG: *u8 = "knowledge/status/wiki_frontend_gate.log" |
| 38 | const WFG_RESP_CAP: i64 = 2097152 // 2 MiB served-response buffer |
| 39 | const WFG_OUTCAP: i64 = 1048576 // 1 MiB cite-render output buffer |
| 40 | const WFG_SCAN_CAP: i64 = 64 // archive segment-scan cap |
functions
| 43 | func wfg_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 44 | func wfg_n(fd: i64, v: i64) -> i64 |
| 53 | func wfg_w2(lfd: i64, s: *u8) -> i64 { wfg_w(1, s); if lfd >= 0 { wfg_w(lfd, s) } return 0 } |
| 54 | func wfg_n2(lfd: i64, v: i64) -> i64 { wfg_n(1, v); if lfd >= 0 { wfg_n(lfd, v) } return 0 } |
| 55 | func wfg_p(s: *u8) -> i64 { wfg_w(1, s); return 0 } |
| 56 | func wfg_pn(v: i64) -> i64 { wfg_n(1, v); return 0 } |
| 57 | func wfg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 59 | func wfg_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 64 | func wfg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 75 | func wfg_find(hay: *u8, hn: i64, needle: *u8) -> i64 |
| 93 | func wfg_has(hay: *u8, hn: i64, needle: *u8) -> i64 calls 1: wfg_find |
| 98 | func main() -> i64 |