nx_pathway.nx
buildroot/runtime/nx_pathway.nx
about
nx_pathway.nx -- cell-graph manifest.
Biological analogue: a signaling pathway is a sequence of molecular
events where signal transduction passes through ordered cells via
vesicles. Nishi pathway is the substrate-level declarative
composition format: a typed directed graph of cells with vesicle
edges between them. Same .nx pathway runs local-only, split across
laptop+NAS+peer GPU, or all-cloud -- the operator changes the per-
cell tropism, not the graph.
Per [[feedback-pathway-tropism-block-composition-location-agnostic]]:
the structural EXCEED-axis vs ComfyUI / Langflow / Airflow DAG /
K8s Argo / Ray Serve / Step Functions ASL / Temporal: those bind
the location of work at graph-definition time. nx_pathway lets the
SAME manifest run differently per cell's nx_tropism resolution.
Composes:
nx_budget -- each cell has a budget pointer; pathway
aggregates for whole-pathway forecasting
nx_attention_class -- each cell declares its class
nx_tropism -- each cell declares preferred location
nx_ribosome -- each cell declares ribosome target
nx_metabolism -- pathway-level hot-site list informs replan
nx_homeostasis -- migration signals at the cell level may
trigger pathway-wide topology re-resolve
V1 ships a fixed-capacity graph with cells + edges. Sub-graph
composition (pathway-of-pathways) is queued; parallel sub-graphs
are representable but the scheduler that exploits them is V2.
Gap list (V1 honest perf verdict):
- no typed payload validation between cells (caller's job)
- no cycle detection (caller must build DAG-correct)
- no per-edge bandwidth budget (queued for distributed scheduler)
- no live re-routing (pathway is rebuilt, not patched, on
migration signal)
- no NxCellSpec field count is bumping the parser's 16-field
ceiling -- stay strict to that contract per
[[feedback-nishilang-16-arg-function-limit]]
dependencies 6 imports · 6 importers
imports: nx_syscalls.nxnx_tier.nxnx_budget.nxnx_attention_class.nxnx_tropism.nxnx_ribosome.nx
imported by: nx_ecosystem_compose_test.nxnx_organism.nxnx_organism_test.nxnx_pathway_test.nxnx_sovereign_compose_test.nxnx_substrate_compose_test.nx
structs
| 74 | struct NxCellSpec |
| 90 | struct NxEdge |
| 102 | struct NxPathway |
consts
| 62 | const NX_PW_OK: nx_int = 0 |
| 63 | const NX_PW_ERR_FULL: nx_int = 1 |
| 64 | const NX_PW_ERR_BAD_CELL: nx_int = 2 |
| 65 | const NX_PW_ERR_BAD_EDGE: nx_int = 3 |
| 66 | const NX_PW_ERR_CELL_NOT_FOUND: nx_int = 4 |
| 112 | const NX_PW_CELLSPEC_BYTES: nx_size = 64 |
| 114 | const NX_PW_EDGE_BYTES: nx_size = 24 |
functions
| 118 | func nx_pathway_new(cell_capacity: nx_size, edge_capacity: nx_size) -> *NxPathway |
| 133 | func _pathway_cell_at(p: *NxPathway, idx: nx_size) -> *NxCellSpec |
| 139 | func _pathway_edge_at(p: *NxPathway, idx: nx_size) -> *NxEdge called by 1: nx_pathway_add_edge |
| 150 | func nx_pathway_add_cell(p: *NxPathway, spec: *NxCellSpec) -> nx_int |
| 169 | func _pathway_find_cell_idx(p: *NxPathway, cell_id: nx_int) -> nx_int |
| 184 | func nx_pathway_add_edge(p: *NxPathway, |
| 201 | func nx_pathway_get_cell(p: *NxPathway, cell_id: nx_int) -> *NxCellSpec called by 5: mainnx_pathway_resolve_targetmainmainmain calls 2: _pathway_find_cell_idx_pathway_cell_at |
| 217 | func nx_pathway_resolve_target(p: *NxPathway, |
| 232 | func nx_pathway_aggregate_ram_max(p: *NxPathway) -> nx_size called by 4: nx_organism_total_ram_maxnx_organism_total_observed_rammainmain calls 1: _pathway_cell_at |
| 247 | func nx_pathway_aggregate_vram_max(p: *NxPathway) -> nx_size |
| 266 | func nx_pathway_count_remote_cells(p: *NxPathway) -> nx_size |