code wiki / _hdl_build / nx_mgmt_core.nx
nx_mgmt_core.nx
buildroot/runtime/_hdl_build/nx_mgmt_core.nx
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
imports: nx_syscalls.nx
imported by: nx_mgmt_api.nxnx_mgmt_core_gate.nx
structs
| none |
consts
| 10 | const MC_MAXR: i64 = 5 // crash-loop policy: restarts-in-window >= MC_MAXR => looping. (a domain threshold) |
functions
| 13 | func mc_is_dup(procs: i64) -> i64 { if procs > 1 { return 1 } return 0 } |
| 14 | func mc_is_loop(rwin: i64) -> i64 { if rwin >= MC_MAXR { return 1 } return 0 } |
| 18 | func mc_is_duel(sup_lineages: i64) -> i64 { if sup_lineages > 1 { return 1 } return 0 } |
| 21 | func mc_verdict(no_data: i64, reasons: i64) -> i64 |
| 31 | func mc_deploy_decide(valid: i64, ship_rc: i64, promote_rc: i64, health_ok: i64) -> i64 called by 1: main |