code wiki / (root) / nx_dr_corpus_cli.nx

nx_dr_corpus_cli.nx

buildroot/runtime/nx_dr_corpus_cli.nx

8324 B173 linesdepth 6pulls 11 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_corpus_cli.nx -- the sovereign deep-research engine over a REAL ON-DISK CORPUS (DR-9). Same one-call loop as nx_dr_chain (judge -> conduct -> score + budget-cost) but each source is a FILE PATH, so it runs over the documents the live nx_fetch spine already writes (knowledge/library/*.txt) instead of argv-sized strings. This is the scale path to a full-corpus benchmark run. nx_dr_corpus <threshold_permil> <budget> <n_insights> <insight_1..n> <cost_1> <path_1> ... e.g. nx_dr_corpus 600 3 2 "tournament of ideas" "liver fibrosis" \ 1 knowledge/library/coscientist.txt 5 knowledge/library/alphafold.txt FAIL-LOUD: an unreadable source is reported (readable:0, counted in "unreadable"), never silently scored as zero coverage. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 6 imports · 0 importers

nx_dr_corpus.nx nx_itoa_lib.nx nx_dr_run.nx nx_dr_conductor.nx nx_dr_drbench.nx nx_syscalls.nx nx_dr_corpus_cli.nx

imports: nx_dr_corpus.nxnx_itoa_lib.nxnx_dr_run.nxnx_dr_conductor.nxnx_dr_drbench.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 cp_puts sys_write cp_key cp_q sys_mmap sys_write ↻ cp_puts ↻ cp_q ↻ sys_exit cp_atoi sys_mmap ↻ drr_tokenize drr_hash drr_strlen corp_tokenize_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close drr_tokenize ↻ chain_judge_all dv_entail dv_contains chain_sel_cov dr_frac dr_sum cond_run cond_quality el_make_etab sys_mmap ↻ sys_mmap ↻ el_run_tournament el_expected el_update ocm_priority ocm_rank

structs

none

consts

18const K_MAGIC_8192: i64 = 8192
19const K_MAGIC_1024: i64 = 1024
20const K_MAGIC_262144: i64 = 262144
21const K_MAGIC_65536: i64 = 65536

functions

23func cp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: cp_keymain calls 1: sys_write
24func cp_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: cp_keymain calls 2: sys_mmapsys_write
25func cp_key(name: *u8) -> i64 { cp_q(); cp_puts(name); cp_q(); cp_puts(":" as *u8); return 0 }
called by 1: main calls 2: cp_qcp_puts
30func cp_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
31func cp_atoi(a: *u8) -> i64
called by 1: main
41func main(argc: i64, argv: *i64) -> i64