code wiki / _hdl_build / nx_search_engine_register.nx

nx_search_engine_register.nx

buildroot/runtime/_hdl_build/nx_search_engine_register.nx

5913 B79 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tooltopic search
docsdependenciesstructsconstsfunctions

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

nx_cap_register.nx nx_pm_review_log.nx nx_syscalls.nx nx_search_engine_register.nx

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

main ser_run sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 cr_w sys_write cr_wn sys_mmap ↻ sys_write ↻ ig_engineer ig_council ig_decision ig_documented pm_open sys_openat_append pm_deliverable pm_flag pm_w sys_write ↻ pm_cstr_len pm_gap pm_flag ↻ sys_close sys_exit ↻ ser_register_one cr_can_register sml_check_cap sml_layer_valid sml_status_valid sys_openat_append ↻ cr_write_entry cr_w ↻ cr_wn ↻ sys_close ↻

structs

none

consts

15const SER_LAYER: i64 = 2 // data/library capability layer (same as the index/search cluster)
16const SER_STATUS: i64 = 2 // ECO_PROVEN -- both gates re-run live below
17const SER_NLAYERS: i64 = 6
18const SER_IDX_HARVEST: i64 = 221
19const SER_IDX_SEARCH: i64 = 222

functions

21func ser_run(path: *u8, arg1: *u8) -> i64
40func ser_register_one(idx: i64, name: *u8, decision: i64) -> i64
49func main() -> i64