code wiki / wiki / nx_artifact_store.nx

nx_artifact_store.nx

buildroot/runtime/wiki/nx_artifact_store.nx

18401 B434 linesdepth 4pulls 4 transitivereach 18 importersview sourcekind librarytopic artifact
docsdependenciesstructsconstsfunctions

about

nx_artifact_store.nx -- pipeline-aware artifact metadata store. Extension of NxWikiDocStore (V1 SHIPPED at 08e67598) with pipeline stage + V5 living-docs taxonomy fields (per V2_0_PIPELINE_BOOTSTRAP_ARC_PLAN ยง2.0). COMPOSES (zero new tokenization / parse / hash code): wiki/nx_wiki_index_builder (NxWikiDocStore base) nx_search_inverted (nx_inv_hash_bytes_lower for path-hash) COMPOSED BY: wiki/nx_pipeline_walker.nx (P-1; populates this store) wiki/nx_pipeline_route.nx (P-3; renders this store as /wiki/pipeline) Per operator cardinal 2026-05-27 "from zero everything nishi": pure NishiLang; composes existing audit primitives (nx_doc_xref D22 + nx_doc_census D1); zero bash + sed. V2.0 SCOPE: - Parallel-pool storage per artifact (path / kind / pipeline_stage / quadrant / topic_type / status / trust_state / competitive_state / last_commit_hash / line_count) - Insert + lookup by path-hash (FNV-1a 64 via existing primitive) - Iterate by stage + by kind (filtered scans) Status: V2.0. 2026-05-27.

dependencies 2 imports · 16 importers

nx_syscalls.nx nx_search_inverted.nx nx_artifact_store.nx _wiki_cite_gate.nx _wiki_cite_live_gate.nx _wiki_frontend_gate.nx _wiki_integrate_gate.nx _wiki_wikilink_gate.nx nx_pipeline_banner.nx nx_pipeline_graph_builder.nx nx_pipeline_recursive_walker.nx nx_pipeline_route.nx nx_pipeline_walker.nx

diagram shows first 10 each side; +0 more imports, +6 more importers in the complete lists below.

imports: nx_syscalls.nxnx_search_inverted.nx

imported by: _wiki_cite_gate.nx_wiki_cite_live_gate.nx_wiki_frontend_gate.nx_wiki_integrate_gate.nx_wiki_wikilink_gate.nxnx_pipeline_banner.nxnx_pipeline_graph_builder.nxnx_pipeline_recursive_walker.nxnx_pipeline_route.nxnx_pipeline_walker.nxnx_wiki_doc_handler.nxnx_wiki_https_daemon.nxnx_wiki_https_daemon_mv.nxnx_wiki_main.nxnx_wiki_routes.nxnx_wiki_vhost_table.nx

structs

109struct NxArtifactStore

consts

31const NX_ART_OK: i64 = 0
32const NX_ART_BAD_INPUT: i64 = 2900
33const NX_ART_STORE_FULL: i64 = 2901
34const NX_ART_POOL_OVERFLOW: i64 = 2902
35const NX_ART_NOT_FOUND: i64 = 2903
36const NX_ART_DUPLICATE_PATH: i64 = 2904
37const NX_ART_BAD_STAGE: i64 = 2905
40const NX_ART_STAGE_UNSTRUCTURED: i64 = 0
41const NX_ART_STAGE_STRUCTURED: i64 = 1
42const NX_ART_STAGE_MEANINGFUL: i64 = 2
43const NX_ART_STAGE_ACTIONABLE: i64 = 3
44const NX_ART_STAGE_REPEATABLE: i64 = 4
45const NX_ART_STAGE_N: i64 = 5
48const NX_ART_KIND_UNKNOWN: i64 = 0
49const NX_ART_KIND_RUNTIME_NX: i64 = 1 // nxc2/runtime/*.nx
50const NX_ART_KIND_CHARTER_MD: i64 = 2 // nishi-silicon/*.md
51const NX_ART_KIND_BENCH_SH: i64 = 3 // nxc2/bench/*.sh
52const NX_ART_KIND_RFC_MD: i64 = 4 // nishi-silicon/RFC*.md or *_DOCTRINE_*.md
53const NX_ART_KIND_MEMORY_MD: i64 = 5 // memory/*.md (operator-private)
54const NX_ART_KIND_DASHBOARD_MD: i64 = 6 // nxc2/docs/dashboards/*.md
55const NX_ART_KIND_SILICON_ARC: i64 = 7 // nishi-silicon/hdl/*.md or *.nx
56const NX_ART_KIND_TEST_NX: i64 = 8 // *_test.nx
57const NX_ART_KIND_OTHER: i64 = 9
58const NX_ART_KIND_N: i64 = 10
61const NX_ART_QUAD_NONE: i64 = 0 // missing front-matter
62const NX_ART_QUAD_TUTORIAL: i64 = 1
63const NX_ART_QUAD_HOWTO: i64 = 2
64const NX_ART_QUAD_REFERENCE: i64 = 3
65const NX_ART_QUAD_EXPLANATION: i64 = 4
66const NX_ART_QUAD_N: i64 = 5
69const NX_ART_DITA_NONE: i64 = 0
70const NX_ART_DITA_TASK: i64 = 1
71const NX_ART_DITA_CONCEPT: i64 = 2
72const NX_ART_DITA_REFERENCE: i64 = 3
73const NX_ART_DITA_GLOSSARY: i64 = 4
74const NX_ART_DITA_N: i64 = 5
77const NX_ART_STATUS_NONE: i64 = 0
78const NX_ART_STATUS_CANONICAL: i64 = 1
79const NX_ART_STATUS_WIP: i64 = 2
80const NX_ART_STATUS_DEPRECATED: i64 = 3
81const NX_ART_STATUS_N: i64 = 4
84const NX_ART_TRUST_NONE: i64 = 0
85const NX_ART_TRUST_WRITTEN_UNTESTED: i64 = 1
86const NX_ART_TRUST_WEBSEARCH_VERIFIED: i64 = 2
87const NX_ART_TRUST_EXPERT_VERIFIED: i64 = 3
88const NX_ART_TRUST_PERSONALLY_MEASURED: i64 = 4
89const NX_ART_TRUST_N: i64 = 5
92const NX_ART_COMP_NONE: i64 = 0
93const NX_ART_COMP_UNCLASSIFIED: i64 = 1
94const NX_ART_COMP_UNDER: i64 = 2
95const NX_ART_COMP_MATCHES: i64 = 3
96const NX_ART_COMP_BEATS: i64 = 4
97const NX_ART_COMP_N: i64 = 5
100const NX_ART_DEFAULT_CAP: i64 = 1000 // V2.0 bounded; covers ~230 known artifacts + headroom
101const NX_ART_HARD_CAP: i64 = 10000
102const NX_ART_PATH_POOL_CAP: i64 = 524288 // 512 KB packed paths
103const NX_ART_HASH_POOL_CAP: i64 = 524288 // 512 KB packed commit hashes
104const NX_ART_MAX_PATH_LEN: i64 = 512
105const NX_ART_LOOP_BUDGET_CAP: i64 = 10000000

functions

148func nx_artifact_store_init(s: *NxArtifactStore, cap: i64) -> i64
called by 3: mainmainnx_mv_setup_site calls 1: sys_mmap
188func nx_artifact_store_add(s: *NxArtifactStore,
251func nx_artifact_store_set_taxonomy(s: *NxArtifactStore, rowid: i64,
280func nx_artifact_store_set_stats(s: *NxArtifactStore, rowid: i64,
305func nx_artifact_store_derive_stage(s: *NxArtifactStore, rowid: i64) -> i64
354func nx_artifact_store_count(s: *NxArtifactStore) -> i64
359func nx_artifact_store_count_by_stage(s: *NxArtifactStore, stage: i64) -> i64
372func nx_artifact_store_path_at(s: *NxArtifactStore, rowid: i64,
384func nx_artifact_store_stage_at(s: *NxArtifactStore, rowid: i64) -> i64
391func nx_artifact_store_kind_at(s: *NxArtifactStore, rowid: i64) -> i64
400func nx_artifact_store_find_by_path(s: *NxArtifactStore,
414func nx_art_stage_name(s: i64) -> *u8
423func nx_art_kind_name(k: i64) -> *u8