nx_pipeline_walker.nx
buildroot/runtime/wiki/nx_pipeline_walker.nx
about
nx_pipeline_walker.nx -- V2.0 P-1 pipeline-walker (Cardinal B FIRST goal).
Walks operator-supplied artifact paths; reads each file via sys_read_file;
parses the V5 living-docs 6-field taxonomy (Quadrant / Topic Type / Status /
Trust State / Competitive State + Composes count); populates NxArtifactStore;
derives pipeline_stage per V2_0_PIPELINE_BOOTSTRAP_ARC_PLAN ยง2.0 mapping.
COMPOSES (zero new parsers; ZERO bash + sed; per operator "from zero
everything nishi" cardinal):
wiki/nx_artifact_store (NxArtifactStore data model)
nx_html_extract (nx_he_match_ci case-insensitive byte match)
nx_search_inverted (nx_inv_hash_bytes_lower)
nx_syscalls (sys_read_file)
COMPOSED BY:
wiki/nx_pipeline_route.nx (P-3 queued; renders this store)
wiki/nx_wiki_main.nx (P-5; startup integration)
Per operator cardinal 2026-05-27: the V5 living-docs system already
exists at nxc2/docs/dashboards/* with bash + sed scaffolding. This
walker is the BITS-UP NishiLang replacement for the taxonomy-extraction
step (taxonomy parse + pipeline-stage derive). The bash pre-commit
rebuilder is queued for nx_git_hook + nx_markdown_render replacement
in a follow-on commit.
V2.0 SCOPE:
- Per-artifact: sys_read_file -> parse 6-field front-matter ->
populate NxArtifactStore -> derive stage
- Bounded by NX_PWALK_MAX_BYTES_PER_FILE
- Skips files larger than cap (rare; flagged as EXEMPT_TOO_LARGE)
V2.5+ SCOPE (TODO):
- sys_getdents recursive walker (V2.0 takes operator-supplied path list)
- nx_git_hook sovereign replacement for pre-commit bash
- Incremental walk (only re-process changed files; content-hash diff)
Status: V2.0. 2026-05-27.
dependencies 6 imports · 2 importers
imports: nx_syscalls.nxnx_html_extract.nxnx_search_inverted.nxnx_artifact_store.nxnx_doc_extractor_nx.nxnx_doc_extractor_md.nx
imported by: nx_pipeline_recursive_walker.nxnx_wiki_main.nx
structs
| none |
consts
| 47 | const NX_PWALK_OK: i64 = 0 |
| 48 | const NX_PWALK_BAD_INPUT: i64 = 2950 |
| 49 | const NX_PWALK_READ_FAILED: i64 = 2951 |
| 50 | const NX_PWALK_FILE_TOO_LARGE: i64 = 2952 |
| 51 | const NX_PWALK_STORE_OVERFLOW: i64 = 2953 |
| 52 | const NX_PWALK_LOOP_BUDGET: i64 = 2954 |
| 53 | const NX_PWALK_PARSE_FAILED: i64 = 2955 |
| 56 | const NX_PWALK_MAX_BYTES_PER_FILE: i64 = 1048576 // 1 MB scan cap |
| 57 | const NX_PWALK_HEAD_SCAN_LIMIT: i64 = 16384 // front-matter in first 16 KB |
| 58 | const NX_PWALK_LOOP_BUDGET_CAP: i64 = 10000000 |
| 61 | const NX_PWALK_ASCII_NL: i64 = 0x0A // '\n' |
| 62 | const NX_PWALK_ASCII_COLON: i64 = 0x3A // ':' |
| 63 | const NX_PWALK_ASCII_OPEN: i64 = 0x5B // '[' |
| 64 | const NX_PWALK_ASCII_CLOSE: i64 = 0x5D // ']' |
functions
| 72 | func nx_pwalk_find_field(src: *u8, src_n: i64, |
| 148 | func nx_pwalk_classify_quadrant(src: *u8, off: i64, n: i64) -> i64 |
| 158 | func nx_pwalk_classify_topic_type(src: *u8, off: i64, n: i64) -> i64 |
| 167 | func nx_pwalk_classify_status(src: *u8, off: i64, n: i64) -> i64 |
| 175 | func nx_pwalk_classify_trust(src: *u8, off: i64, n: i64) -> i64 |
| 187 | func nx_pwalk_classify_competitive(src: *u8, off: i64, n: i64) -> i64 |
| 203 | func nx_pwalk_count_composes(src: *u8, src_n: i64) -> i64 called by 1: nx_pipeline_walker_walk_one |
| 234 | func nx_pwalk_count_lines(src: *u8, src_n: i64) -> i64 called by 1: nx_pipeline_walker_walk_one |
| 247 | func nx_pwalk_classify_kind(path: *u8, path_n: i64) -> i64 |
| 290 | func nx_pipeline_walker_walk_one(store: *NxArtifactStore, |
| 428 | func nx_pipeline_walker_walk_list(store: *NxArtifactStore, calls 1: nx_pipeline_walker_walk_one |