code wiki / (root) / nx_doc_census_real_audit_test.nx

nx_doc_census_real_audit_test.nx

buildroot/runtime/nx_doc_census_real_audit_test.nx

2697 B68 linesdepth 8pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic doc
docsdependenciesstructsconstsfunctions

about

nx_doc_census_real_audit_test.nx -- SUBSTRATE-WIDE V2 audit binary. Walks the REAL nxc2/docs/ filesystem (not a synthetic fixture) and reports current V2 compliance state across the substrate's own ~278 .md docs. This is the substrate's FIRST honest verdict on whether the V2 doctrine the substrate spec'd is being followed. Per [[feedback-never-trust-just-written-until-real-world-harsh- tested]] cardinal: the smoke fixture results (42% on 4 synthetic docs) tell us the LOGIC works; this binary reports what's TRUE across the ACTUAL substrate. Path: hardcoded /mnt/c/Users/elder/nishi-core/nxc2/docs because nx_dir_list requires a path + qemu running under WSL has /mnt/c passthrough. Brittle to other machines; documented limitation. Future: argv-driven root path (queued; nxc2 main() doesn't yet expose argv). Verifies: walk_dir succeeded (rc == 0) n_total > 100 (substrate has ~278 .md; if walk gets <100 the filesystem path is wrong or the walk capped) attestation emits a valid NxEtgEntry Does NOT assert specific compliance % because that changes as docs evolve over time -- the audit reports the CURRENT verdict, not a frozen-in-time gate.

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_string_ops.nx nx_dir.nx nx_grep.nx nx_etg.nx nx_doc_census.nx nx_doc_census_real_audit_test.

imports: nx_syscalls.nxnx_string_ops.nxnx_dir.nxnx_grep.nxnx_etg.nxnx_doc_census.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_doc_census_init nx_doc_census_walk_dir sys_mmap ↻ nx_dir_list nx_openat nx_dirent_read nx_dirent_iter nx_dir_is_dotlike nx_dir_name_strlen nx_dir_arena_copy_name nx_dir_row_at nx_str_ends_with _doccensus_path_join sys_openat_rd sys_read sys_close nx_doc_classify nx_doc_classify_quadrant nx_grep_any nx_grep_first_offset nx_str_find nx_doc_classify_topic_type nx_grep_any ↻ nx_doc_classify_status nx_grep_any ↻ nx_doc_has_trust_state nx_grep_any ↻ nx_doc_has_competitive_sta nx_grep_any ↻ nx_doc_has_websearch_prove nx_grep_any ↻ nx_doc_has_bidirectional_l nx_grep_any ↻ nx_doc_census_accumulate nx_doc_census_report_stdou sys_write _docc_write_kv sys_write ↻

structs

none

consts

none

functions

37func main() -> i64