code wiki / (root) / nx_maint_unify.nx

nx_maint_unify.nx

buildroot/runtime/nx_maint_unify.nx

5461 B120 linesdepth 1pulls 6 transitivereach 13 importersview sourcekind librarytopic maint
docsdependenciesstructsconstsfunctions

about

nx_maint_unify.nx -- R3 unify: the 5 physics kernels speak ONE health language. Each kernel's native verdict maps to a common severity scale so the ledger / DIY app / enterprise fleet-rollup present a uniform grade across every asset type -- and safety-critical faults (overheat, ground-fault, overload, burst) UNIFORMLY surface as SAFETY regardless of which kernel found them. Plus a unified MaintResult row. (The kernels keep their own typed entry points -- their inputs genuinely differ -- so "unify" is at the verdict/severity layer, which is what the platform surface actually needs; forcing one input signature would be worse.) Operator (2026-06-23): build "from the hardware rung up each rung" -- this is R3, consolidating R2's five kernels into one engine the fronts can consume. NEVER-BRICK (#26): pure mapping; no syscalls, no device writes. genealogy_id: project-maintenance-platform-sclass-2026-06-23 (R3 unify) license_tier: ORIGINAL

dependencies 6 imports · 3 importers

nx_maint_ingest.nx nx_hvac_efficiency.nx nx_rot_health.nx nx_consumable.nx nx_fluid_seal.nx nx_electrical.nx nx_maint_unify.nx nx_maint_action.nx nx_maint_ledger.nx nx_maint_unify_test.nx

imports: nx_maint_ingest.nxnx_hvac_efficiency.nxnx_rot_health.nxnx_consumable.nxnx_fluid_seal.nxnx_electrical.nx

imported by: nx_maint_action.nxnx_maint_ledger.nxnx_maint_unify_test.nx

structs

104struct MaintResult

consts

28const NX_HEALTH_NODATA: i64 = 0
29const NX_HEALTH_OK: i64 = 1
30const NX_HEALTH_IDLE: i64 = 2
31const NX_HEALTH_WATCH: i64 = 3 // early warning / monitor
32const NX_HEALTH_DEGRADED: i64 = 4 // plan service
33const NX_HEALTH_URGENT: i64 = 5 // act soon (failure / over-life)
34const NX_HEALTH_SAFETY: i64 = 6 // hazard: fire / shock / burst (highest)
35const NX_HEALTH_UNKNOWN: i64 = 7 // unmapped (first-class)
36const NX_HEALTH_N: i64 = 8

functions

38func nx_health_is_valid(h: i64) -> i64
called by 1: main
45func nx_health_from_thermal(v: i64) -> i64
54func nx_health_from_rot(v: i64) -> i64
64func nx_health_from_cons(v: i64) -> i64
72func nx_health_from_fluid(v: i64) -> i64
81func nx_health_from_elec(v: i64) -> i64
94func nx_maint_severity(kernel: i64, verdict: i64) -> i64
112func nx_maint_result_fill(asset_class: i64, kernel: i64, native_verdict: i64,
called by 1: main calls 1: nx_maint_severity