code wiki / _hdl_build / nx_wiki_walk_gate.nx
nx_wiki_walk_gate.nx
buildroot/runtime/_hdl_build/nx_wiki_walk_gate.nx
about
nx_wiki_walk_gate.nx -- REFEREE for the walkability metrics (modeled on
nx_wiki_exceed_gate). Proves nx_wiki_walk_metrics MEASURES honestly + can SEE
every case (no fabricated greens), via 3 hand-built framed-corpus fixtures:
HEALTHY (3 pages, all reciprocally cross-linked, start reachable):
reciprocity==100, orphans==0, dead-ends==0, reachability==100.
SPARSE (3 pages, NO internal links at all):
orphans high (>=66%), dead-ends==100%, reachability==33% (start only)
-- proves full SENSITIVITY (it does NOT always report healthy).
ONE-AXIS (HEALTHY but one page's outbound link removed -> exactly ONE dead-end
and the reciprocity drops): dead-ends moves 0 -> >0 while orphans STAY
0 -- proves per-axis SPECIFICITY (greens can't be fabricated; moving
one structural fact moves exactly the axes it should, not all-or-none).
LIVE (the real live corpus): metrics RUN and assert the spine MEETS S-class
structure -- orphans==0 AND dead-ends==0 AND reachability==100.
GREEN iff all checks hold. Evidence -> knowledge/status/wiki_walk_gate.log.
Sovereign: imports the organ + nx_framed_append + nx_syscalls. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_wiki_walk_metrics.nxnx_framed_append.nxnx_syscalls.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 WG_LOG: *u8 = "knowledge/status/wiki_walk_gate.log" |
| 24 | const WG_LIVE_CORPUS: *u8 = "knowledge/status/ims_live_corpus.txt" |
| 25 | const WG_LINKS: *u8 = "knowledge/registry/wiki_links.tsv" |
| 26 | const WG_RECCAP: i64 = 512 |
functions
| 28 | func wg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != 0 as u8 { dst[off + i] = s[i]; i = i + 1 } return off + i } |
| 29 | func wg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 39 | func wg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } return n } called by 1: wg_emit_page |
| 42 | func wg_write_file(path: *u8, content: *u8, clen: i64) -> i64 |
| 49 | func wg_tmppath(out: *u8, stem: *u8, epoch: i64, pid: i64) -> i64 |
| 58 | func wg_emit_page(dst: *u8, off: i64, url: *u8, body: *u8) -> i64 |
| 70 | func wg_row(name: *u8, pass: i64) -> i64 |
| 83 | func main() -> i64 |