code wiki / (root) / nx_tool_census_run_test.nx

nx_tool_census_run_test.nx

buildroot/runtime/nx_tool_census_run_test.nx

1850 B50 linesdepth 8pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic tool
docsdependenciesstructsconstsfunctions

about

nx_tool_census_run_test.nx -- end-to-end bits-up audit binary. Composes nx_dir_list (syscall walk) + sys_openat_rd / sys_read / sys_close (per-file I/O) + nx_tool_census_classify (sealed-enum classifier) + nx_tool_census_accumulate (counts) -- all in bits-up NishiLang. No bash / grep / xargs / awk in the LOGIC or I/O paths. Smoke harness creates /tmp/nx_census_fixture/ with 4 synthetic files: nx_alpha.nx header has 'AUTO-GENERATED' -> AUTO_GENERATED nx_bravo.nx header has 'Composes: nx_x' -> HAND_WRITTEN_DECLARED nx_charlie.nx header is plain -> HAND_WRITTEN_UNDECLARED nx_delta_test.nx any content (suffix wins) -> TEST This binary walks that dir + verifies counts match. Exit 0 = PASS; non-zero codes identify which assertion failed. Substrate's first end-to-end bits-up audit executable.

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_string_ops.nx nx_dir.nx nx_grep.nx nx_tool_census.nx nx_tool_census_run_test.nx

imports: nx_syscalls.nxnx_string_ops.nxnx_dir.nxnx_grep.nxnx_tool_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_tool_census_counts_init nx_tool_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 _census_path_join sys_openat_rd nx_tool_census_accumulate nx_tool_census_kind_is_val sys_read sys_close nx_tool_census_classify _census_name_is_test nx_str_ends_with _census_name_is_offc nx_str_starts_with _census_content_is_autogen nx_grep_any nx_grep_first_offset nx_str_find _census_content_has_lineag nx_grep_any ↻ nx_tool_census_pct_declare

structs

none

consts

none

functions

26func main() -> i64