nx_trust_state.nx
buildroot/runtime/nx_trust_state.nx
about
nx_trust_state.nx -- bits-up trust-state classifier for substrate
primitives. Operationalizes the cardinal:
"never trust anything just written till we real world test it
in the harsh conditions no theory, no lab, no optimal
conditions, working on mediocre suboptimal stuff and world
class stuff and barely function range type thinking"
Per [[feedback-never-trust-just-written-until-real-world-harsh-
tested]] cardinal: every substrate primitive declares its
current trust state explicitly in its header. Trust escalates
only through empirical harsh-condition evidence.
Composes:
nx_etg.nx (NxEtgEntry attestation; trust-state classifications
emit ETG entries so the substrate's audit chain carries
trust-state context)
[[feedback-physical-truth-over-published-docs-silicon-empirical-
gamification]] (G-ETG cardinal applied INWARD to substrate's
own primitives, not just to external silicon)
[[feedback-audits-are-ecosystem-citizens-not-islands]] (this
classifier IS an audit primitive; ecosystem-citizen wired
via NxEtgEntry)
[[NISHI_FLOW_DOCTRINE_ROADMAP]] (trust state contributes to
flow condition #9 sense-of-control: substrate knows what it
does + does not yet know about its own primitives)
**Trust State:** WRITTEN_UNTESTED (this file is brand-new in
the current session; not yet KAT-passed; substrate-honest
initial declaration per the cardinal)
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_etg.nx
imported by: nx_trust_state_test.nx
structs
| 134 | struct NxTrustRecord |
consts
| 55 | const NX_TRUST_UNWRITTEN: i64 = 0 // primitive doesn't exist yet |
| 56 | const NX_TRUST_WRITTEN_UNTESTED: i64 = 1 // code exists; no KAT; DO NOT TRUST |
| 57 | const NX_TRUST_LAB_TESTED_QEMU: i64 = 2 // KAT passes on qemu only; STILL DO NOT TRUST |
| 58 | const NX_TRUST_LAB_TESTED_NATIVE: i64 = 3 // KAT passes on native single-arch; MINIMAL TRUST |
| 59 | const NX_TRUST_CROSS_ARCH_TESTED: i64 = 4 // ≥2 ISAs; PROBATION TRUST |
| 60 | const NX_TRUST_SUBOPTIMAL_HARDWARE_TESTED: i64 = 5 // mediocre real hardware; MID TRUST |
| 61 | const NX_TRUST_BARELY_FUNCTIONAL_TESTED: i64 = 6 // barely-functional real hardware; HIGH TRUST |
| 62 | const NX_TRUST_WORLD_CLASS_TESTED: i64 = 7 // flagship modern real hardware; UPPER BAND CONFIRMED |
| 63 | const NX_TRUST_RANGE_TESTED: i64 = 8 // all three hardware bands; PRODUCTION-CANDIDATE |
| 64 | const NX_TRUST_TIME_PROVEN: i64 = 9 // RANGE_TESTED + N months real-world; PRODUCTION_TRUSTED |
| 65 | const NX_TRUST_N: i64 = 10 |
| 109 | const NX_HW_BAND_NONE: i64 = 0 |
| 110 | const NX_HW_BAND_BARELY_FUNCTIONAL: i64 = 1 // RPi Zero / old laptop thermal-throttled / MCU |
| 111 | const NX_HW_BAND_SUBOPTIMAL: i64 = 2 // 5-year-old laptop / consumer-SKU binned-down |
| 112 | const NX_HW_BAND_WORLD_CLASS: i64 = 3 // flagship modern; well-cooled; fully-featured |
| 113 | const NX_HW_BAND_N: i64 = 4 |
functions
| 67 | func nx_trust_is_valid(t: i64) -> i64 |
| 73 | func nx_trust_name(t: i64) -> *u8 |
| 92 | func nx_trust_is_production_capable(t: i64) -> i64 called by 1: main |
| 99 | func nx_trust_is_fully_proven(t: i64) -> i64 called by 1: main |
| 115 | func nx_hw_band_is_valid(b: i64) -> i64 |
| 121 | func nx_hw_band_name(b: i64) -> *u8 |
| 142 | func nx_trust_record_init(r: *NxTrustRecord, primitive_id_hash: i64) called by 1: main |
| 153 | func nx_trust_record_band_pass(r: *NxTrustRecord, band: i64) -> i64 |
| 190 | func nx_trust_record_set_state(r: *NxTrustRecord, state: i64) -> i64 |
| 213 | func nx_trust_to_etg_outcome(r: *NxTrustRecord) -> i64 |
| 221 | func nx_trust_attest( |