code wiki / (root) / nx_entity_discover.nx

nx_entity_discover.nx

buildroot/runtime/nx_entity_discover.nx

11619 B250 linesdepth 5pulls 13 transitivereach 0 importersview sourcekind tooltopic entity
docsdependenciesstructsconstsfunctions

about

nx_entity_discover.nx -- SREACH R3b: CRAWLER-DRIVEN ENTITY DISCOVERY. module: nishi-core.search.entity_discover depends: nx_guarded_run.nx, nx_html_links.nx, nx_bm25.nx, /tmp/_ed_fetch_html.sov.elf (seed HTML), /tmp/_dlr_fetch_one.sov.elf (text) capability: GATE + EVIDENCE OPERATOR LINE CLOSED HERE: seeds are no longer hand-curated. The crawler starts from entity hub pages OUR index already reaches (wikidata + wikipedia), extracts their outbound links with the nx_html_links kernel, keeps the CROSS-HOST ones whose URL names the entity, then guarded-fetches each DISCOVERED page over the sovereign stack, indexes it, and retrieves the entity query from THAT index. Every result row is durable evidence; walls stay named-not-faked. GATE (Rule #11 bars): discovered >= 3 -- the link harvest found genuinely new cross-host pages retrieved >= 1 -- at least one DISCOVERED page fetched+indexed+retrievable (conservative: anonymous fetches of social hosts often hit login walls -- a wall is a finding, not a discovery failure)

dependencies 8 imports · 0 importers

nx_str.nx nx_syscalls.nx nx_search_inverted.nx nx_guarded_run.nx nx_html_links.nx nx_bm25.nx nx_html_to_text.nx nx_content_measure.nx nx_entity_discover.nx

imports: nx_str.nxnx_syscalls.nxnx_search_inverted.nxnx_guarded_run.nxnx_html_links.nxnx_bm25.nxnx_html_to_text.nxnx_content_measure.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ed_p sys_write nx_str_len sys_openat_rd sys_exit sys_close sys_mmap sys_openat_wr sys_openat_append ed_f sys_write ↻ nx_str_len ↻ ed_fn sys_mmap ↻ sys_write ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real ed_seed_url ed_seed_out nx_guarded_run sys_fork sys_dup3 sys_execve sys_exit ↻ sys_mmap ↻ sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_wait4 nx_kill sys_sleep_ms sys_mmap ↻ sys_munmap ed_n sys_write ↻ sys_mmap ↻ ed_read_all sys_openat_rd ↻

structs

none

consts

29const NX_MAGIC_131072: i64 = 131072
30const NX_MAGIC_524288: i64 = 524288
31const NX_MAGIC_2048: i64 = 2048
33const NX_ED_SEEDS: i64 = 2
34const NX_ED_MAXDISC: i64 = 8
35const NX_ED_DEADLINE: i64 = 18000
36const NX_ED_MIN_DISCOVERED: i64 = 3
37const NX_ED_MIN_RETRIEVED: i64 = 1

functions

39func ed_p(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
40func ed_n(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
48func ed_f(fd: i64, s: *u8) -> i64 { sys_write(fd, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
49func ed_fn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
60func ed_lc(c: i64) -> i64 { if c >= 0x41 { if c <= 0x5A { return c + 0x20 } } return c }
called by 1: ed_ci_contains
61func ed_ci_contains(hay: *u8, needle: *u8) -> i64
called by 2: ed_is_seed_hostmain calls 2: nx_str_lened_lc
77func ed_streq(a: *u8, b: *u8) -> i64
called by 1: main
84func ed_seed_url(e: i64) -> *u8
called by 1: main
89func ed_seed_out(e: i64) -> *u8
93func ed_disc_out(d: i64) -> *u8
104func ed_read_all(path: *u8, buf: *u8, cap: i64) -> i64
119func ed_is_seed_host(url: *u8) -> i64
126func main() -> i64