code wiki / _hdl_build / nx_ims_monitor_gate.nx
nx_ims_monitor_gate.nx
buildroot/runtime/_hdl_build/nx_ims_monitor_gate.nx
about
nx_ims_monitor_gate.nx -- REFEREE for the IMS A1 orphan + link-rot monitor.
Proves the PURE logic with in-memory fixtures (no I/O) AND with TEETH -- a
monitor that always says "0 orphans / 0 dead" would pass a clean fixture, so
every clean assertion is paired with a PLANTED-fault assertion that FORCES a
specific non-zero finding at a known identity:
T1 CLEAN corpus (every non-root page linked, no dead links)
-> orphans == 0 AND dead == 0
T2 PLANTED ORPHAN (page "lonely" that NOBODY links)
-> orphans == 1 AND the orphan is exactly rowid(lonely) [TEETH]
T3 PLANTED DEAD LINK (a page hrefs "/wiki/ghost.html", no such page)
-> dead == 1 AND the dead target is exactly "ghost" [TEETH]
T4 NEG-CONTROL: the root (start) is linked by NOBODY but is NOT flagged
-> start NOT in orphans, while a real orphan IS (proves the root
exclusion is real, not "flag nothing") [TEETH]
T5 NEG-CONTROL: the monitor does NOT touch the corpus -- a self-link does
not rescue an orphan, and a present target is NOT a dead link.
GREEN iff T1..T5 with EXACT counts + identities. exit 0 GREEN / 1 RED. Logs to
knowledge/status/ims_monitor_gate.log. Sovereign: nx_ims_monitor (which
composes nx_wiki_index_builder + nx_wiki_backlinks) + nx_syscalls.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_ims_monitor.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
| none |
functions
| 28 | func gp(logfd: i64, s: *u8) -> i64 |
| 35 | func gn(logfd: i64, v: i64) -> i64 |
| 50 | func gb(logfd: i64, p: *u8, n: i64) -> i64 |
| 62 | func grow(logfd: i64, name: *u8, ok: i64) -> i64 |
| 70 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: add_page |
| 73 | func add_page(st: *NxWikiDocStore, url: *u8, body: *u8) -> i64 |
| 77 | func main() -> i64 |