code wiki / _hdl_build / nx_oeuvre_resolve.nx

nx_oeuvre_resolve.nx

buildroot/runtime/_hdl_build/nx_oeuvre_resolve.nx

13167 B307 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_oeuvre_resolve.nx -- SREACH-OEUVRE O2: the ANY-NODE RESOLVER. Turns a free-text producer/work/franchise/medium term into a CANONICAL sovereign entity anchor (its Wikidata Q-id), LIVE, over our own TLS stack -- the front door of "search Tinto Brass / Zatoichi / ukiyo-e and get the real entity, not a guess". No privileged root: person, org, franchise, character and medium all resolve through the SAME path (the Q-id is type-agnostic). HONEST SCOPE (rule 5, no-overclaim): the HARD gate is RESOLUTION -- each term fetches its English-Wikipedia page (guarded, sovereign) and yields a DISTINCT real Wikidata Q-id (wgWikibaseItemId, deterministic). COARSE type (person/org/franchise/character/medium) is a best-effort lead-marker heuristic, REPORTED not gated -- authoritative typing = the Wikidata P31 "instance of" statement, which O3 reads when it fetches Wikidata to enumerate works. Resolved anchors persist as resolve:<bk> records in the oeuvre store for O3 to consume. Walls stay named-not-faked (a fetch failure is a finding, not a fabricated id). Evidence -> knowledge/status/oeuvre_resolve.log. license_tier: ORIGINAL module: nishi-core.search.oeuvre.resolve depends: nx_guarded_run.nx, nx_str.nx, nx_seg_store.nx, /tmp/_ed_fetch_html.sov.elf capability: RESOLVER + GATE + EVIDENCE

dependencies 5 imports · 0 importers

nx_str.nx nx_itoa_lib.nx nx_syscalls.nx nx_guarded_run.nx nx_seg_store.nx nx_oeuvre_resolve.nx

imports: nx_str.nxnx_itoa_lib.nxnx_syscalls.nxnx_guarded_run.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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

main or_p sys_write nx_str_len sys_openat_rd sys_exit sys_close sys_mmap sys_openat_wr sys_openat_append or_f sys_write ↻ nx_str_len ↻ or_fn nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real ss_begin ss_begin_cap sys_mmap ↻ or_cat

structs

none

consts

24const OR_MAGIC_786432: i64 = 786432
26const OR_PREFIX: *u8 = "knowledge/store/oeuvre-"
27const OR_LOG: *u8 = "knowledge/status/oeuvre_resolve.log"
28const OR_NTERMS: i64 = 5
29const OR_DEADLINE: i64 = 18000

functions

31func or_p(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
36func or_n(v: i64) -> i64 { nxi_out(v); return 0 }
calls 1: nxi_out
37func or_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
42func or_fn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
44func or_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: main
46func or_streq(a: *u8, b: *u8) -> i64
53func or_lc(c: i64) -> i64 { if c >= 0x41 { if c <= 0x5A { return c + 0x20 } } return c }
called by 1: or_ci_has
54func or_ci_has(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: or_type calls 2: nx_str_lenor_lc
69func or_find(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: or_qid calls 1: nx_str_len
86func or_qid(html: *u8, hn: i64, out: *u8) -> i64
calls 1: or_find
116func or_type(html: *u8, hn: i64) -> i64
calls 1: or_ci_has
134func or_tname(t: i64) -> *u8
143func or_term(i: i64) -> *u8
150func or_bk(i: i64) -> *u8
157func or_wpath(i: i64) -> *u8
164func or_exptype(i: i64) -> i64
171func or_out(i: i64) -> *u8
179func or_read_all(path: *u8, buf: *u8, cap: i64) -> i64
193func or_seg_next() -> i64
200func main() -> i64