nx_reclaim.nx
buildroot/runtime/nx_reclaim.nx
about
nx_reclaim.nx -- composed reclamation operation.
Per [[feedback-reclamation-doctrine-captain-moroni]]: the operation
that turns commodity hardware (Intel ME / AMD PSP / baseband /
vendor BMC) into substrate that's safe for chosen niches while
hostile components remain visible+contained.
THIS IS THE BRIDGE PRIMITIVE between the optimization-layer work
(nx_organism / nx_symbiote / nx_treaty / nx_budget / nx_homeostasis)
and the sovereignty-doctrine work (nx_attest_silicon / nx_xenocell /
the 8 reclamation mitigations / the immune tier-1 primitives queued).
nx_reclaim COMPOSES THEM. Given a hardware target, it:
1. Calls nx_attest_silicon to learn the chip's threat surface
and applied mitigations -> computes effective trust ceiling
2. Instantiates an nx_xenocell for each known hostile component
3. Registers the xenocell with the caller-supplied organism so
its observed consumption gets counted into host pressure
4. Computes a safety envelope: what's safe-for-this-chip
(gameplay/content/dev) vs unsafe (secrets/identity/PII)
5. Returns the envelope so the caller can decide what cells to
run on this host AND what cells to refuse
Per the Captain Moroni discipline: we don't ABANDON commodity
hardware (that would cede ground to vendors who profit from
helplessness). We RECLAIM it for chosen niches by applying every
available mitigation + making every adversarial action visible.
Composes:
nx_attest_silicon -- chip threat surface lookup
nx_xenocell -- hostile component wrapping
nx_organism -- ecosystem registration
nx_budget -- per-niche budget caps from trust ceiling
nx_evict_journal -- reclamation events logged
V1 ships the synchronous composition. V2 will add ongoing-
monitoring loops that re-evaluate the envelope when mitigations
change (e.g., user disables an egress filter -> trust ceiling
drops -> sovereignty-critical cells refused mid-session).
dependencies 8 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nxnx_budget.nxnx_attention_class.nxnx_evict_journal.nxnx_attest_silicon.nxnx_xenocell.nxnx_organism.nx
imported by: nx_reclaim_test.nxnx_sovereign_compose_test.nx
structs
| 104 | struct NxSafetyEnvelope |
consts
| 73 | const NX_RC_OK: nx_int = 0 |
| 74 | const NX_RC_ERR_BAD_CHIP: nx_int = 1 |
| 75 | const NX_RC_ERR_ORGANISM_FULL: nx_int = 2 |
| 76 | const NX_RC_ERR_UNSAFE_FOR_NICHE: nx_int = 3 |
| 83 | const NX_NICHE_GAMEPLAY: nx_int = 0 |
| 84 | const NX_NICHE_CONTENT_CREATION: nx_int = 1 |
| 85 | const NX_NICHE_DEV: nx_int = 2 |
| 86 | const NX_NICHE_BROWSING: nx_int = 3 |
| 87 | const NX_NICHE_FAMILY_COMMS: nx_int = 4 |
| 88 | const NX_NICHE_IDENTITY: nx_int = 5 // signing, master secrets |
| 89 | const NX_NICHE_HEALTH_PII: nx_int = 6 // medical records, biometrics |
| 90 | const NX_NICHE_FINANCIAL: nx_int = 7 |
| 91 | const NX_NICHE_N_NICHES: nx_int = 8 |
functions
| 122 | func nx_niche_is_valid(n: nx_int) -> nx_int called by 1: main |
| 135 | func _reclaim_safe_for_niche(trust_q10: nx_int, niche: nx_int) -> nx_int called by 1: nx_reclaim |
| 178 | func _reclaim_spawn_xenocell_for_surface(chip_family: nx_int, |
| 211 | func nx_reclaim(chip_family: nx_int, |
| 306 | func nx_reclaim_can_run_niche(env: *NxSafetyEnvelope, niche: nx_int) -> nx_int |