code wiki / _hdl_build / nx_mgmt_core.nx

nx_mgmt_core.nx

buildroot/runtime/_hdl_build/nx_mgmt_core.nx

2360 B37 linesdepth 2pulls 2 transitivereach 9 importersview sourcekind librarytopic mgmt
docsdependenciesstructsconstsfunctions

about

nx_mgmt_core.nx -- the LOGIC / DOMAIN layer of the management plane (the hexagonal CORE). PURE business rules: NO IO, NO HTTP, NO file/exec, NO sockets. It computes verdicts/flags/decisions from PRIMITIVE inputs only, so it is independently testable and the transport (IO) + data (adapter) layers depend on IT -- never the reverse (dependency inversion). Grounded in the banked architecture research (knowledge/library/arch_*.txt: three-tier presentation/logic/data + hexagonal ports-and-adapters + loose coupling / high cohesion + dependency-inversion + SRP). This is the inner ring; adapters plug in at the edges. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_mgmt_core.nx nx_mgmt_api.nx nx_mgmt_core_gate.nx

imports: nx_syscalls.nx

imported by: nx_mgmt_api.nxnx_mgmt_core_gate.nx

structs

none

consts

10const MC_MAXR: i64 = 5 // crash-loop policy: restarts-in-window >= MC_MAXR => looping. (a domain threshold)

functions

13func mc_is_dup(procs: i64) -> i64 { if procs > 1 { return 1 } return 0 }
14func mc_is_loop(rwin: i64) -> i64 { if rwin >= MC_MAXR { return 1 } return 0 }
18func mc_is_duel(sup_lineages: i64) -> i64 { if sup_lineages > 1 { return 1 } return 0 }
21func mc_verdict(no_data: i64, reasons: i64) -> i64
called by 2: ma_emit_healthmain
31func mc_deploy_decide(valid: i64, ship_rc: i64, promote_rc: i64, health_ok: i64) -> i64
called by 1: main