code wiki / (root) / nx_frontier_scan_review_candidate_t346.nx

nx_frontier_scan_review_candidate_t346.nx

buildroot/runtime/nx_frontier_scan_review_candidate_t346.nx

92991 B1703 linesdepth 4pulls 9 transitivereach 1 importersview sourcekind tooltopic frontier
docsdependenciesstructsconstsfunctions

about

nx_frontier_scan.nx -- THE AUTONOMOUS FRONTIER-NOTICER for a /compare domain. Operator 2026-08-20: "we want to be able to notice things like the metahuman gap without needing claude by having our own research on /compare sota and best of breed and workflowed and mcp and api etc". WHAT THE METAHUMAN GAP ACTUALLY WAS (mined from the transcripts, not assumed -- writer session 55724797-9f7b-4f68-81aa-fd2de7997175, 2026-08-18 18:15:25Z): the operator said the characters looked wrong, a seat ran FIVE WebSearch calls, and appended four citations to charsim.refs whose URLs IT NEVER OPENED (three carry mirror '-' pin '-'; the fourth points at a page fetched three days earlier from a DIFFERENT url). The gap therefore had TWO halves and only ONE of them needed the outside: (A) the INTERNAL deficit signal -- rivals coded Best on skin/hair rows where our symbol is _ABSENT_. Already mechanical, already in our own data, and NOBODY HAD EVER COMPUTED IT. (B) the OUTSIDE BAR -- the 2026 numbers. That genuinely needed the live web. This organ computes (A) from the domain's own files and pulls (B) through the sovereign fetcher. IT EMITS PROPOSALS AND NEVER ADMITS ONE. It does not write <domain>.matrix, <domain>.refs, or any watch cell. The measured law it obeys: no margin threshold makes auto-declaration safe (nx_memsugg, precision 808->890 permil at 24 percent coverage), and A COMPLETION SIGNAL THAT KEYS ON A NAME REWARDS WRITING THE NAME. The list is the answer; a seat adjudicates it. SEEDS ARE DATA, NEVER HAND-TYPED. They come from the domain's own board: <domain>.axes field 4 is literally "frontier-kw;frontier-kw" -- the estate ALREADY declares per-row frontier keywords and nothing had ever consumed them. <domain>.matrix field 1 (the row label) -- always, so a domain without .axes still has seeds. SOURCES ARE DATA TOO: knowledge/frontier_sources.conf. Both endpoints shipped with it were PROVEN reachable through nx_research_fetch before a line of this was written (arXiv API 200/12267 B, HN Algolia 200/17063 B) -- necessary because nx_websearch is OUR OWN CRAWL INDEX (0 results for "metahuman"), so it structurally cannot see the outside. VERBS seeds <domain> -- what this domain is about, from its own data. No network. deficit <domain> -- the internal signal, ranked, WITH THE REASON PER ROW. No network. scan <domain> [maxrows] [maxitems] -- fetch + diff + print proposals. Network. Writes nothing. propose <domain> [maxrows] [maxitems] -- scan, then file the worklist + the frontierprop- plane rows. RESOURCE ENVELOPE (a shipping criterion, not an afterthought): outbound requests are exactly rows_scanned x sources, both bounded by conf and echoed in every run line; buffers are sized FROM THE INPUT (sys_read_file, matrix+refs bytes, source count) so there is no ceiling to guess; the only writes are one worklist file and at most rows x sources x 2 plane upserts, keyed by url hash so a re-scan UPSERTS rather than grows.

dependencies 6 imports · 1 importers

nx_syscalls.nx nx_deploy_lib.nx nx_comparetree_lib.nx nx_barfresh_lib.nx nx_buf_dyn.nx nx_estate_path.nx nx_frontier_scan_review_candid nx_frontier_review_gate_t346.nx

imports: nx_syscalls.nxnx_deploy_lib.nxnx_comparetree_lib.nxnx_barfresh_lib.nxnx_buf_dyn.nxnx_estate_path.nx

imported by: nx_frontier_review_gate_t346.nx

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

main fs_w sys_write fs_slen sys_exit fs_basename fs_slen ↻ fs_streq fs_slen ↻ fs_emit_seeds sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ fs_cmp_path fs_has_slash fs_cat fs_slen ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close fs_has_slash ↻ ct_readall_2dir sys_mmap ↻ ct_build_path

structs

none

consts

65const FS_PIPE: i64 = 124
66const FS_NL: i64 = 10
67const FS_HASH: i64 = 35
68const FS_AT: i64 = 64
69const FS_SEMI: i64 = 59
70const FS_SPACE: i64 = 32
71const FS_PLUS: i64 = 43
72const FS_ZERO: i64 = 48
73const FS_NINE: i64 = 57
74const FS_UPA: i64 = 65
75const FS_UPZ: i64 = 90
76const FS_LOA: i64 = 97
77const FS_LOZ: i64 = 122
78const FS_USCORE: i64 = 95
79const FS_SLASH: i64 = 47
80const FS_COLON: i64 = 58
81const FS_LBRACE: i64 = 123
86const FS_SECTION_MAX: i64 = 16
87const FS_PATHCAP: i64 = 1024
88const FS_URLCAP: i64 = 2048
89const FS_TXTCAP: i64 = 4096
90const FS_MAXP: i64 = 12
91const FS_MAXROWS: i64 = 64
92const FS_RIVALS: i64 = 4
93const FS_CODE_BEST: i64 = 2
94const FS_CODE_YES: i64 = 1
95const FS_HASH_BASE: i64 = 131
96const FS_HASH_MASK: i64 = 0xffffffff
97const FS_HEXDIG: i64 = 8
98const FS_HEXSHIFT: i64 = 4
99const FS_HEXRADIX: i64 = 16
100const FS_PERMIL: i64 = 1000
101const FS_DIRMODE: i64 = 0x1ed
102const FS_PLANE_ARGS: i64 = 10
106const FS_LINECAP: i64 = 4 * 2048 + 1024
109const FS_PROPS_PER_ROW: i64 = 2
509const FS_CODE_PART: i64 = 3
770const FS_DASH: i64 = 45
771const FS_CR: i64 = 13
772const FS_MONTH_TAG: *u8 = "month="
773const FS_MONTH_TAG_LEN: i64 = 6
774const FS_DATED_PIPES: i64 = 10 // src|kind|url|item|topen|tclose|uopen|uclose|join|dopen|dclose
775const FS_ATT_C_BARS: i64 = 0
776const FS_ATT_C_APPENDED: i64 = 1
777const FS_ATT_C_ALREADY: i64 = 2
778const FS_ATT_C_UNATTESTABLE: i64 = 3
779const FS_ATT_C_FETCHES: i64 = 4
780const FS_ATT_C_NEWER: i64 = 5
781const FS_ATT_C_STALE: i64 = 6
782const FS_ATT_C_N: i64 = 8
783const FS_YMBUF: i64 = 16
784const FS_TODAYBUF: i64 = 32

functions

111func fs_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
112func fs_w(s: *u8) -> i64 { sys_write(1, s, fs_slen(s)); return 0 }
113func fs_wn(base: *u8, off: i64, len: i64) -> i64
118func fs_n(v: i64) -> i64 { nxi_fd(1, v); return 0 }
119func fs_cat(dst: *u8, pos: i64, s: *u8) -> i64
126func fs_catn(dst: *u8, pos: i64, src: *u8, a: i64, b: i64) -> i64
132func fs_eol(buf: *u8, n: i64, i: i64) -> i64
138func fs_find(buf: *u8, n: i64, from: i64, lit: *u8) -> i64
156func fs_item_end(buf: *u8, n: i64, it: i64, idlm: *u8) -> i64
162func fs_fold(c: i64) -> i64
168func fs_streq(a: *u8, ao: i64, ae: i64, lit: *u8) -> i64
175func fs_prefix(a: *u8, ao: i64, ae: i64, lit: *u8) -> i64
182func fs_is_row(buf: *u8, i: i64, le: i64) -> i64
190func fs_pipes(buf: *u8, i: i64, le: i64, pos: *i64) -> i64
201func fs_digit_at(buf: *u8, a: i64, b: i64) -> i64
210func fs_atoi(s: *u8) -> i64
called by 1: main
228func fs_conf_get(cb: *u8, cn: i64, key: *u8) -> i64
264func fs_tok_in(hay: *u8, hn: i64, tok: *u8, tl: i64) -> i64
283func fs_cover_permil(title: *u8, a: i64, b: i64, corp: *u8, cn: i64, min_token: i64, tok: *u8) -> i64
called by 1: fs_scan_source calls 2: fs_foldfs_tok_in
317func fs_seed_q(dst: *u8, src: *u8, a: i64, b: i64, cap: i64, maxtok: i64, min_token: i64, join: *u8) -> i64
360func fs_urlhash(buf: *u8, a: i64, b: i64) -> i64
called by 1: main
366func fs_hex(dst: *u8, pos: i64, v: i64) -> i64
called by 1: main
383func fs_has_slash(s: *u8) -> i64
388func fs_basename(s: *u8) -> i64
called by 1: main
394func fs_cmp_path(dst: *u8, dom: *u8, ext: *u8) -> i64
407func fs_emit_seeds(dom: *u8) -> i64
510func fs_code_rank(c: i64) -> i64
called by 1: fs_deficit
521func fs_deficit(mb: *u8, mn: i64, lead_code: i64, rowa: *i64, rowb: *i64, score: *i64, verbose: i64) -> i64
592func fs_fetch(url: *u8, tmpout: *u8, savepath: *u8, olen: *i64) -> i64
627func fs_scan_source(dom: *u8, kind: *u8, url: *u8, idlm: *u8, topen: *u8, tclose: *u8,
787func fs_ym_at(rb: *u8, a: i64, b: i64) -> i64
794func fs_fixed_month(spec: *u8) -> i64
799func fs_w_ym(b: *u8, ix: i64) -> i64 { bf_ym_write(b, 0, ix); fs_w(b); return 0 }
800func fs_catn_num(dst: *u8, pos: i64, v: i64) -> i64
called by 1: fs_attest_domain calls 1: sys_mmap
812func fs_today(dst: *u8) -> i64
828func fs_item_mentions(rb: *u8, it: i64, ie: i64, subj: *u8, so: i64, sn: i64, min_token: i64, tok: *u8) -> i64
called by 1: fs_newest_month calls 2: fs_foldfs_tok_in
845func fs_item_field(rb: *u8, it: i64, ie: i64, open: *u8, close: *u8, off: *i64) -> i64
859func fs_newest_month(rb: *u8, rn: i64, idlm: *u8, dopen: *u8, dclose: *u8, fixed: i64, max_items: i64,
902func fs_attest_row(plan: *u8, refkey: *u8, today: *u8, ym: i64, note: *u8) -> i64
931func fs_ref_url(refs: *u8, refsn: i64, key: *u8, klen: i64, off: *i64) -> i64
952func fs_src_fields(sb: *u8, spos: *i64, sle: i64, kind: *u8, idlm: *u8, topen: *u8, tclos: *u8, uopen: *u8, uclos: *u8, join: *u8, dopen: *u8, dclos: *u8) -> i64
called by 1: fs_attest_domain calls 1: fs_catn
965func fs_build_url(url: *u8, sb: *u8, a: i64, b: i64, qbuf: *u8) -> i64
called by 1: fs_attest_domain calls 2: fs_prefixfs_cat
978func fs_review_span(row:*NxBufOwned,src:*u8,n:i64)->i64
985func fs_review_newer(wl:*NxBufOwned,dbase:*u8,pb:*u8,ido:i64,idl:i64,kind:*u8,ym:i64,rb:*u8,rn:i64,bit:i64,idlm:*u8,topen:*u8,tclos:*u8,uopen:*u8,uclos:*u8,mirror:*u8)->i64
1013func fs_read_estate(path:*u8,n:*i64)->*u8
1020func fs_attest_domain(dom: *u8, dbase: *u8, sb: *u8, sn: i64, today: *u8, max_items: i64, min_token: i64, seed_tokens: i64, tot: *i64) -> i64
1215func main(argc: i64, argv: *i64) -> i64