nx_field_discover.nx
buildroot/runtime/nx_field_discover.nx
about
nx_field_discover.nx -- DISCOVER THE FIELD FOR ONE /compare DOMAIN (/compare/fieldwatch FW1, 2026-09-05): the thin
program over nx_field_lib. Reads buildroot/knowledge/compare/<dom>.seeds (seed|key|url|kind|why[|Display Name]), mirrors
every seed through the sovereign fetcher (provenance-pinned into knowledge/fetched/cmp_field_<dom>_<key>.<ext>), runs the
kind's extractor over the mirror, and writes buildroot/knowledge/compare/<dom>.field -- the population of rivals with
evidence counts, which the compare emitter renders and against which a matrix's columns are measured as a subset.
KINDS: wiki-raw gh-topic md-list are DISCOVERY seeds (the industry's own lists, read mechanically); named is a DECLARED
member of the population (operator correction 2026-09-05: Nexus Mods, LoversLab and the other major modding communities
were absent from every discovered list, so the population is ENUMERATED as data, every member's home page mirrored and
pinned, and the discovery seeds CORROBORATE it -- a member also named by a public list carries seeds_hit >= 2).
Usage: nx_field_discover <dom> [--nofetch] --nofetch reuses the mirrors already on disk (no network)
Receipt: FIELD-OK dom= seeds= fetched= reused= failed= named= candidates= mentions= capped= bytes= (partition printed)
Exits: 0 ok | 2 usage | 3 refused (no seeds file, no seed rows, output unwritable) | 4 every seed failed
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_tool_run.nxnx_field_lib.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
| 19 | const FD_ROOT: *u8 = "/volume1/homes/elderwesto/nishihost/" |
| 20 | const FD_FETCHER: *u8 = "/volume1/homes/elderwesto/nishihost/_offc/nx_research_fetch.elf" |
| 21 | const FD_SEEDS_DIR: *u8 = "buildroot/knowledge/compare/" |
| 22 | const FD_MIRROR_DIR: *u8 = "knowledge/fetched/" |
| 23 | const FD_MIRROR_PFX: *u8 = "cmp_field_" |
| 24 | const FD_PATH_CAP: i64 = 1024 |
| 25 | const FD_KEY_CAP: i64 = 96 |
| 30 | const FD_SEED_F: i64 = 6 // seed|key|url|kind|why|Display Name -- the sixth field is read only for kind named |
| 31 | const FD_SEED_MIN: i64 = 5 // a row needs at least seed|key|url|kind|why |
| 32 | const FD_F_NAME: i64 = 5 // index of the Display Name field |
| 33 | const FD_CAPCAP: i64 = 262144 |
| 34 | const FD_ARGVN: i64 = 8 |
| 35 | const FD_MODE: i64 = 0x1a4 |
| 36 | const FD_EXIT_USAGE: i64 = 2 |
| 37 | const FD_EXIT_REFUSE: i64 = 3 |
| 38 | const FD_EXIT_ALLFAIL: i64 = 4 |
| 39 | const FD_CH_NL: i64 = 10 |
| 40 | const FD_CH_PIPE: i64 = 124 |
| 41 | const FD_CH_HASH: i64 = 35 |
| 42 | const FD_CH_MINUS: i64 = 45 |
| 43 | const FD_OUTFD: i64 = 1 |
| 44 | const FD_ERRFD: i64 = 2 |
functions
| 46 | func fd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 48 | func fd_count_seed_rows(sb: *u8, sn: i64) -> i64 called by 1: main |
| 59 | func fd_out(s: *u8) -> i64 { sys_write(FD_OUTFD, s, fd_slen(s)); return 0 } |
| 60 | func fd_err(s: *u8) -> i64 { sys_write(FD_ERRFD, s, fd_slen(s)); return 0 } |
| 61 | func fd_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { if off + i < FD_PATH_CAP - 1 { dst[off + i] = s[i] } i = i + 1 } var o: i64 = off + i; if o > FD_PATH_CAP - 1 { o = FD_PATH_CAP - 1 } dst[o] = 0 as u8; return o } called by 1: main |
| 62 | func fd_catn(dst: *u8, off: i64, b: *u8, s: i64, e: i64) -> i64 { var i: i64 = 0; while s + i < e { if off + i < FD_PATH_CAP - 1 { dst[off + i] = b[s + i] } i = i + 1 } var o: i64 = off + i; if o > FD_PATH_CAP - 1 { o = FD_PATH_CAP - 1 } dst[o] = 0 as u8; return o } called by 1: main |
| 63 | func fd_span_eq(b: *u8, s: i64, e: i64, lit: *u8) -> i64 |
| 69 | func fd_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } called by 1: main |
| 70 | func fd_kind_code(b: *u8, s: i64, e: i64) -> i64 |
| 77 | func fd_ext(kind: i64) -> *u8 called by 1: main |
| 83 | func fd_exists(path: *u8, lenout: *i64) -> *u8 |
| 93 | func fd_same(a: *u8, an: i64, b: *u8, bn: i64) -> i64 called by 1: main |
| 100 | func fd_fetch(url: *u8, dest: *u8, cap: *u8, olen: *i64) -> i64 |
| 121 | func main(argc: i64, argv: *i64) -> i64 |