code wiki / wiki / nx_pipeline_walker.nx

nx_pipeline_walker.nx

buildroot/runtime/wiki/nx_pipeline_walker.nx

20313 B456 linesdepth 5pulls 8 transitivereach 2 importersview sourcekind librarytopic pipeline
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_html_extract.nx nx_search_inverted.nx nx_artifact_store.nx nx_doc_extractor_nx.nx nx_doc_extractor_md.nx nx_pipeline_walker.nx nx_pipeline_recursive_walker.nx nx_wiki_main.nx

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

47const NX_PWALK_OK: i64 = 0
48const NX_PWALK_BAD_INPUT: i64 = 2950
49const NX_PWALK_READ_FAILED: i64 = 2951
50const NX_PWALK_FILE_TOO_LARGE: i64 = 2952
51const NX_PWALK_STORE_OVERFLOW: i64 = 2953
52const NX_PWALK_LOOP_BUDGET: i64 = 2954
53const NX_PWALK_PARSE_FAILED: i64 = 2955
56const NX_PWALK_MAX_BYTES_PER_FILE: i64 = 1048576 // 1 MB scan cap
57const NX_PWALK_HEAD_SCAN_LIMIT: i64 = 16384 // front-matter in first 16 KB
58const NX_PWALK_LOOP_BUDGET_CAP: i64 = 10000000
61const NX_PWALK_ASCII_NL: i64 = 0x0A // '\n'
62const NX_PWALK_ASCII_COLON: i64 = 0x3A // ':'
63const NX_PWALK_ASCII_OPEN: i64 = 0x5B // '['
64const NX_PWALK_ASCII_CLOSE: i64 = 0x5D // ']'

functions

72func nx_pwalk_find_field(src: *u8, src_n: i64,
148func nx_pwalk_classify_quadrant(src: *u8, off: i64, n: i64) -> i64
158func nx_pwalk_classify_topic_type(src: *u8, off: i64, n: i64) -> i64
167func nx_pwalk_classify_status(src: *u8, off: i64, n: i64) -> i64
175func nx_pwalk_classify_trust(src: *u8, off: i64, n: i64) -> i64
187func nx_pwalk_classify_competitive(src: *u8, off: i64, n: i64) -> i64
203func nx_pwalk_count_composes(src: *u8, src_n: i64) -> i64
234func nx_pwalk_count_lines(src: *u8, src_n: i64) -> i64
247func nx_pwalk_classify_kind(path: *u8, path_n: i64) -> i64
290func nx_pipeline_walker_walk_one(store: *NxArtifactStore,
428func nx_pipeline_walker_walk_list(store: *NxArtifactStore,