code wiki / _hdl_build / nx_ims_monitor_gate.nx

nx_ims_monitor_gate.nx

buildroot/runtime/_hdl_build/nx_ims_monitor_gate.nx

13177 B241 linesdepth 7pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic ims
docsdependenciesstructsconstsfunctions

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

nx_ims_monitor.nx nx_syscalls.nx nx_ims_monitor_gate.nx

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

main sys_openat_append gp sys_write sys_mmap nx_wiki_doc_store_init sys_mmap ↻ add_page nx_wiki_doc_store_add sys_mmap ↻ nx_wib_pool_alloc slen nx_ims_resolve_root nx_wiki_doc_store_count sys_mmap ↻ nx_wiki_doc_store_lookup nx_ims_slug_eq sys_mmap ↻ nx_ims_norm_slug nx_ims_strip_frag_query gn gp ↻ sys_mmap ↻ sys_write ↻ nx_ims_orphans nx_wiki_doc_store_count ↻ sys_mmap ↻ nx_ims_inbound_counts nx_wiki_doc_store_count ↻ sys_mmap ↻ nx_wiki_doc_store_lookup ↻ nx_ims_collect_targets sys_mmap ↻ nx_wiki_forward_links nx_ims_href_links nx_ims_strip_frag_query ↻ nx_ims_slug_eq ↻ nx_ims_is_root nx_ims_dead_links nx_wiki_doc_store_count ↻

structs

none

consts

none

functions

28func gp(logfd: i64, s: *u8) -> i64
called by 3: gngrowmain calls 1: sys_write
35func gn(logfd: i64, v: i64) -> i64
called by 1: main calls 3: gpsys_mmapsys_write
50func gb(logfd: i64, p: *u8, n: i64) -> i64
called by 1: main calls 1: sys_write
62func grow(logfd: i64, name: *u8, ok: i64) -> i64
called by 1: main calls 1: gp
70func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: add_page
73func add_page(st: *NxWikiDocStore, url: *u8, body: *u8) -> i64
called by 1: main calls 2: nx_wiki_doc_store_addslen
77func main() -> i64