nx_pipeline_graph_builder.nx
buildroot/runtime/wiki/nx_pipeline_graph_builder.nx
about
nx_pipeline_graph_builder.nx -- V2.0 P-8.5: populate NxDepGraph from
NxArtifactStore via doc_extractor_nx imports + suffix-match resolution.
Closes the dep-graph data path: walker -> store -> graph -> Tarjan SCC ->
per-artifact cycle membership exposed at /wiki/pipeline + /wiki/<doc>.
COMPOSES:
wiki/nx_artifact_store (artifact paths to resolve against)
hub/nx_doc_extractor_nx (nx_doc_extract_nx_imports +
nx_doc_imports_iter_next)
hub/nx_dep_graph (graph storage + Tarjan)
nx_syscalls.sys_read_file (re-read .nx bodies for imports)
nx_html_extract.nx_he_match_ci (path suffix match for resolution)
COMPOSED BY:
wiki/nx_wiki_main (startup; called after artifact_store populated)
V2.0 P-8.5 SCOPE:
- For each RUNTIME_NX / TEST_NX / SILICON_ARC artifact: re-read body;
extract import paths; suffix-match each against artifact paths;
add resolved edges to graph
- Bounded by NX_ARTIFACT_STORE artifact_cap + edges_cap
- Per Cardinal 14 graceful degradation: per-file read failures skip
the artifact; unresolved imports skipped silently
V3+ SCOPE (TODO):
- Body cache in NxArtifactStore (avoid re-read)
- Hash-keyed import resolution (avoid O(N) suffix match)
- Per-import resolution-confidence score (exact vs ambiguous match)
Status: V2.0 P-8.5. 2026-05-27.
dependencies 5 imports · 1 importers
imports: nx_syscalls.nxnx_html_extract.nxnx_artifact_store.nxnx_doc_extractor_nx.nxnx_dep_graph.nx
imported by: nx_wiki_main.nx
structs
| none |
consts
| 40 | const NX_PGB_OK: i64 = 0 |
| 41 | const NX_PGB_BAD_INPUT: i64 = 3060 |
| 42 | const NX_PGB_READ_FAILED: i64 = 3061 |
| 43 | const NX_PGB_GRAPH_FULL: i64 = 3062 |
| 44 | const NX_PGB_LOOP_BUDGET: i64 = 3063 |
| 47 | const NX_PGB_IMPORTS_BUF_CAP: i64 = 16384 // 16 KB per-artifact packed imports |
| 48 | const NX_PGB_LOOP_BUDGET_CAP: i64 = 10000000 |
functions
| 60 | func nx_pgb_resolve_import(store: *NxArtifactStore, |
| 95 | func nx_pipeline_build_dep_graph(store: *NxArtifactStore, |