code wiki / (root) / nx_trust_state.nx

nx_trust_state.nx

buildroot/runtime/nx_trust_state.nx

10704 B243 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind librarytopic trust
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_etg.nx nx_trust_state.nx nx_trust_state_test.nx

imports: nx_syscalls.nxnx_etg.nx

imported by: nx_trust_state_test.nx

structs

134struct NxTrustRecord

consts

55const NX_TRUST_UNWRITTEN: i64 = 0 // primitive doesn't exist yet
56const NX_TRUST_WRITTEN_UNTESTED: i64 = 1 // code exists; no KAT; DO NOT TRUST
57const NX_TRUST_LAB_TESTED_QEMU: i64 = 2 // KAT passes on qemu only; STILL DO NOT TRUST
58const NX_TRUST_LAB_TESTED_NATIVE: i64 = 3 // KAT passes on native single-arch; MINIMAL TRUST
59const NX_TRUST_CROSS_ARCH_TESTED: i64 = 4 // ≥2 ISAs; PROBATION TRUST
60const NX_TRUST_SUBOPTIMAL_HARDWARE_TESTED: i64 = 5 // mediocre real hardware; MID TRUST
61const NX_TRUST_BARELY_FUNCTIONAL_TESTED: i64 = 6 // barely-functional real hardware; HIGH TRUST
62const NX_TRUST_WORLD_CLASS_TESTED: i64 = 7 // flagship modern real hardware; UPPER BAND CONFIRMED
63const NX_TRUST_RANGE_TESTED: i64 = 8 // all three hardware bands; PRODUCTION-CANDIDATE
64const NX_TRUST_TIME_PROVEN: i64 = 9 // RANGE_TESTED + N months real-world; PRODUCTION_TRUSTED
65const NX_TRUST_N: i64 = 10
109const NX_HW_BAND_NONE: i64 = 0
110const NX_HW_BAND_BARELY_FUNCTIONAL: i64 = 1 // RPi Zero / old laptop thermal-throttled / MCU
111const NX_HW_BAND_SUBOPTIMAL: i64 = 2 // 5-year-old laptop / consumer-SKU binned-down
112const NX_HW_BAND_WORLD_CLASS: i64 = 3 // flagship modern; well-cooled; fully-featured
113const NX_HW_BAND_N: i64 = 4

functions

67func nx_trust_is_valid(t: i64) -> i64
73func nx_trust_name(t: i64) -> *u8
92func nx_trust_is_production_capable(t: i64) -> i64
called by 1: main
99func nx_trust_is_fully_proven(t: i64) -> i64
called by 1: main
115func nx_hw_band_is_valid(b: i64) -> i64
121func nx_hw_band_name(b: i64) -> *u8
142func nx_trust_record_init(r: *NxTrustRecord, primitive_id_hash: i64)
called by 1: main
153func nx_trust_record_band_pass(r: *NxTrustRecord, band: i64) -> i64
called by 1: main calls 1: nx_hw_band_is_valid
190func nx_trust_record_set_state(r: *NxTrustRecord, state: i64) -> i64
called by 1: main calls 1: nx_trust_is_valid
213func nx_trust_to_etg_outcome(r: *NxTrustRecord) -> i64
called by 2: nx_trust_attestmain
221func nx_trust_attest(