nx_pipeline_recursive_walker.nx
buildroot/runtime/wiki/nx_pipeline_recursive_walker.nx
about
nx_pipeline_recursive_walker.nx -- V2.5 recursive directory walker
expanding pipeline classification from 24 hardcoded paths to all
substrate artifacts under operator-supplied roots.
Per operator cardinal 2026-05-27: "lots and lots of parts of this on
the gitea" -- this walker discovers ALL .nx / .md / .sh files in the
substrate without operator maintaining a hardcoded list.
COMPOSES (per "avoid duplicate primitives" cardinal):
nx_dir (sovereign getdents64 wrapper; NxDirRow + nx_dir_list)
wiki/nx_pipeline_walker (V2.0 P-1; per-file taxonomy + stage derivation)
wiki/nx_artifact_store (V2.0 P-2; data destination)
nx_syscalls (sys_mmap)
COMPOSED BY:
wiki/nx_wiki_main (startup; replaces hardcoded 24-path list)
V2.5 SCOPE:
- Recursive walk bounded by max-depth + max-entries
- Per-extension filter (.nx / .md / .sh; skip everything else)
- Skip dot-like entries (., .., .git, .DS_Store hidden)
- Skip _site/ subdirs (generated content; not source artifacts)
- Per-root call; caller iterates over roots
V3+ SCOPE (TODO):
- Operator-configurable exclude patterns (.gitignore parser)
- Symlink loop detection
- Incremental walk (only re-process changed; content-hash diff)
- Per-file last-commit-hash via nx_git_walk
Status: V2.5. 2026-05-27.
dependencies 5 imports · 1 importers
imports: nx_syscalls.nxnx_dir.nxnx_pipeline_walker.nxnx_artifact_store.nxnx_html_extract.nx
imported by: nx_wiki_main.nx
structs
| none |
consts
| 40 | const NX_PREC_OK: i64 = 0 |
| 41 | const NX_PREC_BAD_INPUT: i64 = 3000 |
| 42 | const NX_PREC_DIR_LIST_FAILED: i64 = 3001 |
| 43 | const NX_PREC_MAX_DEPTH_EXCEEDED: i64 = 3002 |
| 44 | const NX_PREC_STORE_FULL: i64 = 3003 |
| 45 | const NX_PREC_LOOP_BUDGET: i64 = 3004 |
| 46 | const NX_PREC_PATH_TOO_LONG: i64 = 3005 |
| 49 | const NX_PREC_MAX_DEPTH: i64 = 8 |
| 50 | const NX_PREC_MAX_ENTRIES_PER_DIR: i64 = 4096 |
| 51 | const NX_PREC_PATH_BUF_CAP: i64 = 1024 |
| 52 | const NX_PREC_NAME_ARENA_CAP: i64 = 65536 // 64 KB per dir-list batch |
| 53 | const NX_PREC_LOOP_BUDGET_CAP: i64 = 100000 |
functions
| 60 | func nx_prec_is_eligible_ext(name: *u8, name_n: i64) -> i64 called by 1: nx_pipeline_recursive_walk |
| 85 | func nx_prec_should_skip_subdir(name: *u8, name_n: i64) -> i64 |
| 120 | func nx_prec_build_path(out_path: *u8, cap: i64, called by 1: nx_pipeline_recursive_walk |
| 142 | func nx_pipeline_recursive_walk(store: *NxArtifactStore, |
| 229 | func nx_pipeline_recursive_walk_roots(store: *NxArtifactStore, calls 1: nx_pipeline_recursive_walk |