code wiki / (root) / nx_fragility_analysis.nx

nx_fragility_analysis.nx

buildroot/runtime/nx_fragility_analysis.nx

11462 B249 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan library
docsdependenciesstructsconstsfunctions

about

nx_fragility_analysis.nx -- generic dependency-graph fragility primitive. license_tier: PUBLIC_NISHI_SUBSTRATE genealogy_id: taleb_2012_antifragile_concept_inverse + perrow_1984_normal_accidents_tightly_coupled_systems + thwaites_2009_toaster_project_dependency_invisibility + nishi_pillar_9_supply_chain_redundancy_2026 + nishi_replenisher_not_consumer_cardinal_2026 The cross-cutting "where does this system break" primitive. Given a dependency graph + per-node metadata, returns the fragility verdict + the named breakage points. Used by: - Real life: Pillar 9 supply-chain redundancy (Potato Cell BOM: which components are SINGLE_SOURCE_HIGH?) - In-game: Thwaites Toaster lesson made interactive (player tried to build X; substrate enumerates the 47 hidden deps + the 5 unsubstitutables) - Both: the dependency tree IS the curriculum per [[feedback-replenisher-not-consumer-substrate-shared-with-game]] ===== The fragility taxonomy ===================================== Composes against: - nx_manufacturing_posture.NX_SUPPLY_RISK_* (per-component risk) - nx_evidence_tier (knowledge-graph fragility for claims) - nx_grower_skill_tier (player competency graph) Domain-agnostic: applies to BOMs, supply chains, recipes, skill prerequisites, biological food webs, code dependency graphs, etc.

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_fragility_analysis.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

82struct FragilityNode

consts

42const NX_FRAG_NEGLIGIBLE: i64 = 1 // no SINGLE_SOURCE_HIGH; redundancy >= 2 per critical node
43const NX_FRAG_MODERATE: i64 = 2 // some SINGLE_SOURCE_LOW; tolerable
44const NX_FRAG_HIGH: i64 = 3 // SINGLE_SOURCE_HIGH on non-critical OR multiple SINGLE_SOURCE_LOW on critical path
45const NX_FRAG_CRITICAL: i64 = 4 // SINGLE_SOURCE_HIGH on critical path; whole system at risk
46const NX_FRAG_UNKNOWN: i64 = 5
59const NX_FRAG_KIND_SINGLE_SOURCE: i64 = 1 // one supplier; can rug-pull
60const NX_FRAG_KIND_SINGLE_POINT_OF_FAIL: i64 = 2 // cut-vertex in dependency graph
61const NX_FRAG_KIND_HIDDEN_EXTERNALITY: i64 = 3 // cost paid by another part of the graph
62const NX_FRAG_KIND_MISSING_COMPETENCY: i64 = 4 // player/operator lacks required skill
63const NX_FRAG_KIND_TIGHT_COUPLING: i64 = 5 // Perrow 1984; cascading failure risk
64const NX_FRAG_KIND_TIME_DEGRADATION: i64 = 6 // component decays before use (seed viability!)
65const NX_FRAG_KIND_KNOWLEDGE_OPACITY: i64 = 7 // dependency exists but is hidden from operator
95const NX_FRAGILITY_NODE_BYTES: i64 = 80 // 10 fields * 8 bytes
232const NX_LESSON_SOURCE_DIVERSITY: i64 = 1
233const NX_LESSON_REDUNDANCY_BUDGETING: i64 = 2
234const NX_LESSON_EXTERNALITY_ACCOUNTING: i64 = 3
235const NX_LESSON_SKILL_PREREQUISITES: i64 = 4
236const NX_LESSON_COUPLING_AWARENESS: i64 = 5
237const NX_LESSON_TIME_PRESSURE: i64 = 6
238const NX_LESSON_TRANSPARENCY: i64 = 7

functions

48func nx_fragility_verdict_name(v: i64) -> *u8
67func nx_fragility_kind_name(k: i64) -> *u8
97func nx_fragility_node_new(node_id: i64, node_name_ptr: *u8) -> *FragilityNode
calls 1: sys_mmap
118func nx_fragility_classify_node(n: *FragilityNode) -> i64
142func nx_fragility_dominant_kind(n: *FragilityNode) -> i64
163func nx_fragility_graph_verdict(nodes: **FragilityNode, n_nodes: i64) -> i64
190func nx_fragility_bus_factor(nodes: **FragilityNode, n_nodes: i64) -> i64
240func nx_fragility_lesson_handle(kind: i64) -> i64