nx_maint_unify.nx
buildroot/runtime/nx_maint_unify.nx
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
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
| 104 | struct MaintResult |
consts
| 28 | const NX_HEALTH_NODATA: i64 = 0 |
| 29 | const NX_HEALTH_OK: i64 = 1 |
| 30 | const NX_HEALTH_IDLE: i64 = 2 |
| 31 | const NX_HEALTH_WATCH: i64 = 3 // early warning / monitor |
| 32 | const NX_HEALTH_DEGRADED: i64 = 4 // plan service |
| 33 | const NX_HEALTH_URGENT: i64 = 5 // act soon (failure / over-life) |
| 34 | const NX_HEALTH_SAFETY: i64 = 6 // hazard: fire / shock / burst (highest) |
| 35 | const NX_HEALTH_UNKNOWN: i64 = 7 // unmapped (first-class) |
| 36 | const NX_HEALTH_N: i64 = 8 |
functions
| 38 | func nx_health_is_valid(h: i64) -> i64 called by 1: main |
| 45 | func nx_health_from_thermal(v: i64) -> i64 |
| 54 | func nx_health_from_rot(v: i64) -> i64 |
| 64 | func nx_health_from_cons(v: i64) -> i64 |
| 72 | func nx_health_from_fluid(v: i64) -> i64 |
| 81 | func nx_health_from_elec(v: i64) -> i64 |
| 94 | func nx_maint_severity(kernel: i64, verdict: i64) -> i64 |
| 112 | func nx_maint_result_fill(asset_class: i64, kernel: i64, native_verdict: i64, |