code wiki / _hdl_build / nx_search_engine_register.nx
nx_search_engine_register.nx
buildroot/runtime/_hdl_build/nx_search_engine_register.nx
about
nx_search_engine_register.nx -- GOVERNED registration of the two search-engine rungs landed 2026-06-10:
idx=221 LIB HARVEST-V2 (nx_library_harvest_v2: dir-walk + per-DOC rows + durable index/docmap pair)
idx=222 LIB SEARCH-CLI (nx_search_cli: argv -> on-disk index -> docmap -> BM25 top-K, the front door)
Engineer verdict = re-run the REAL artifacts (no typed scores): the harvest ELF must gate green (exit 0,
it self-checks rows==docs + dark-term on-disk queries) and the search CLI must answer a live query (exit 0).
DUAL-WRITE: appends CAPREG to /tmp (the live registry) AND knowledge/status/cap_registry_durable.log --
the Archivist's reboot lesson applied at write time, not snapshot time (/tmp already ate CAPREG 216-220 once).
Also flags to the PM log the FIXED core defect found en route: nx_inv_query_term read `count` u32s but pass-2
dedup writes only `write_cursor` entries -> the zero tail surfaced PHANTOM docid 0 (fix: fill from cursor).
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_cap_register.nxnx_pm_review_log.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
| 15 | const SER_LAYER: i64 = 2 // data/library capability layer (same as the index/search cluster) |
| 16 | const SER_STATUS: i64 = 2 // ECO_PROVEN -- both gates re-run live below |
| 17 | const SER_NLAYERS: i64 = 6 |
| 18 | const SER_IDX_HARVEST: i64 = 221 |
| 19 | const SER_IDX_SEARCH: i64 = 222 |
functions
| 21 | func ser_run(path: *u8, arg1: *u8) -> i64 |
| 40 | func ser_register_one(idx: i64, name: *u8, decision: i64) -> i64 |
| 49 | func main() -> i64 |