code wiki / (root) / nx_dr_corpus.nx

nx_dr_corpus.nx

buildroot/runtime/nx_dr_corpus.nx

1457 B26 linesdepth 5pulls 5 transitivereach 1 importersview sourcekind librarytopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_corpus.nx -- FILE-BACKED corpus mode for the sovereign deep-research engine (DR-9). The chain judged documents passed as argv strings, which caps a source at the argv limit -- a real fetched web page (tens of KB) cannot ride there. This organ reads a source document from DISK, so the engine runs over the corpus the live nx_fetch spine already writes (knowledge/library/*.txt). That is the concrete unlock for a full-corpus benchmark run. FAIL-LOUD BY CONSTRUCTION: an unreadable or empty source returns -1 so the caller REPORTS it rather than silently scoring a missing file as zero coverage (a silent-truncation trap). Composes nx_dr_chain (judge -> conduct -> score) and nx_dr_run (tokenizer). Every func <=6 params (NAS nx_cc >6-arg skew, debt seq239). No hardware writes (Rule 26). module: nishi-core.research.dr_corpus depends: nx_dr_chain.nx, nx_dr_run.nx, nx_syscalls.nx genealogy_id: drbench_2026_corpus_scale

dependencies 3 imports · 1 importers

nx_dr_chain.nx nx_dr_run.nx nx_syscalls.nx nx_dr_corpus.nx nx_dr_corpus_cli.nx

imports: nx_dr_chain.nxnx_dr_run.nxnx_syscalls.nx

imported by: nx_dr_corpus_cli.nx

structs

none

consts

none

functions

20func corp_tokenize_file(path: *u8, out_ids: *i64, maxn: i64) -> i64