nx_etg.nx
buildroot/runtime/nx_etg.nx
about
nx_etg.nx -- Empirical-Truth Gamification substrate primitive.
E1 first stone of NISHI_ETG_ROADMAP.md. Implements the substrate-
wide doctrine [[feedback-physical-truth-over-published-docs-silicon-
empirical-gamification]]: vendor docs are HYPOTHESES, the silicon
is the truth. Every probe outcome records what the silicon
actually did, classifies it against what the vendor claimed, and
emits a ProvenanceLinked decision attestation.
This brick is the TAXONOMY + ACCOUNTING + ATTESTATION layer.
Real probes (E3 cpu / E5 gpu / E4 storage / E7 net) compose this.
Composes:
[[NISHI_ETG_ROADMAP]] E1 (this is the first stone)
[[feedback-physical-truth-over-published-docs-silicon-empirical-gamification]]
[[NISHI_GRAPHICS_ROADMAP]] G3.5 nx_calibrate_gpu (GPU-tier ETG)
[[NISHI_SELF_ASSEMBLY_ROADMAP]] SA-2 nx_calibrate (CPU-tier prior art)
[[NISHI_RACING_CREW_ROADMAP]] (Byzantine-verified empirical measurement)
[[feedback-no-false-ok-substrate-honesty-audit]] (every outcome
deterministically classified; INCONCLUSIVE is the honest verdict
when probes disagree, not silent silence)
[[feedback-reclamation-doctrine-captain-moroni]] (RECLAIMED outcome
is the substrate's accounting record)
Cardinal 13 (additive — entries tombstone via outcome=FALSIFIED on
re-probe; never deleted)
API:
Probe outcome sealed enum NX_ETG_OUTCOME_*
NxEtgEntry struct (one per probe call)
nx_etg_outcome_is_valid(o) -> i64
nx_etg_outcome_name(o) -> *u8
nx_etg_outcome_implies_reclamation(o) -> i64
nx_etg_entry_init(...) (caller-provided struct storage)
nx_etg_reclamation_delta(entry) -> i64
nx_etg_attestation_hash(entry) -> i64 (FNV-1a 64-bit; E1 scaffolding;
upgradeable to SHA-512)
nx_etg_attestation_deterministic(e1, e2) -> i64 (same inputs ->
same attestation hash; gate
for ProvenanceLinked replay)
dependencies 2 imports · 21 importers
diagram shows first 10 each side; +0 more imports, +11 more importers in the complete lists below.
imports: nx_syscalls.nxnx_fnv.nx
imported by: nx_bench_core.nxnx_bench_core_test.nxnx_competitive_state.nxnx_competitive_state_test.nxnx_doc_census.nxnx_doc_census_real_audit_test.nxnx_doc_census_real_listing_test.nxnx_doc_census_run_test.nxnx_doc_census_test.nxnx_etg_byzantine.nxnx_etg_byzantine_test.nxnx_etg_probe_cpu.nxnx_etg_probe_cpu_test.nxnx_etg_test.nxnx_etg_tournament.nxnx_etg_tournament_test.nxnx_flow_state.nxnx_flow_state_test.nxnx_tool_census.nxnx_trust_state.nxnx_trust_state_test.nx
structs
| 194 | struct NxEtgEntry |
consts
| 71 | const NX_ETG_OUTCOME_NONE: i64 = 0 |
| 72 | const NX_ETG_OUTCOME_CONFIRMED: i64 = 1 // doc agrees, silicon agrees |
| 73 | const NX_ETG_OUTCOME_VENDOR_LIED_OMISSION: i64 = 2 // silicon does MORE than doc claimed |
| 74 | const NX_ETG_OUTCOME_VENDOR_LIED_MISDIRECTION: i64 = 3 // silicon does DIFFERENT than doc claimed |
| 75 | const NX_ETG_OUTCOME_FALSIFIED: i64 = 4 // doc claim failed |
| 76 | const NX_ETG_OUTCOME_PAYWALLED_BUT_RESPONSIVE: i64 = 5 // gated feature responds to direct register |
| 77 | const NX_ETG_OUTCOME_RECLAIMED: i64 = 6 // capability added to cost model after probe |
| 78 | const NX_ETG_OUTCOME_INCONCLUSIVE: i64 = 7 // N-of-M probes disagree |
| 79 | const NX_ETG_OUTCOME_THROTTLED: i64 = 8 // silicon stable above vendor max |
| 80 | const NX_ETG_OUTCOME_FUSED_OFF: i64 = 9 // silicon refuses (vendor disabled at fuse) |
| 81 | const NX_ETG_OUTCOME_UNDOCUMENTED_CAPABILITY: i64 = 10 // works but no spec coverage |
| 82 | const NX_ETG_OUTCOME_N: i64 = 11 |
| 128 | const NX_ETG_PROBE_NONE: i64 = 0 |
| 129 | const NX_ETG_PROBE_CPU_ISA: i64 = 1 |
| 130 | const NX_ETG_PROBE_CPU_CLOCK: i64 = 2 |
| 131 | const NX_ETG_PROBE_CPU_CACHE: i64 = 3 |
| 132 | const NX_ETG_PROBE_CPU_SYSCALL: i64 = 4 |
| 133 | const NX_ETG_PROBE_CPU_POWER: i64 = 5 |
| 134 | const NX_ETG_PROBE_GPU_CU: i64 = 6 |
| 135 | const NX_ETG_PROBE_GPU_TENSOR: i64 = 7 |
| 136 | const NX_ETG_PROBE_GPU_CLOCK: i64 = 8 |
| 137 | const NX_ETG_PROBE_GPU_DMA: i64 = 9 |
| 138 | const NX_ETG_PROBE_GPU_THERMAL: i64 = 10 |
| 139 | const NX_ETG_PROBE_GPU_ISA: i64 = 11 |
| 140 | const NX_ETG_PROBE_STORAGE_NVME: i64 = 12 |
| 141 | const NX_ETG_PROBE_STORAGE_RAM: i64 = 13 |
| 142 | const NX_ETG_PROBE_NET_LINK: i64 = 14 |
| 143 | const NX_ETG_PROBE_NET_TLS: i64 = 15 |
| 144 | const NX_ETG_PROBE_NPU: i64 = 16 |
| 145 | const NX_ETG_PROBE_DSP: i64 = 17 |
| 149 | const NX_ETG_PROBE_AUDIT_TOOL_GENEALOGY: i64 = 18 // nx_tool_census |
| 150 | const NX_ETG_PROBE_AUDIT_BIT_LEVEL: i64 = 19 // nx_bit_level_census |
| 151 | const NX_ETG_PROBE_AUDIT_GENEALOGY_MAP: i64 = 20 // nx_genealogy_map |
| 152 | const NX_ETG_PROBE_AUDIT_CROSS_ARCH: i64 = 21 // cross-arch parity |
| 153 | const NX_ETG_PROBE_N: i64 = 22 |
| 167 | const NX_ETG_CLAIM_NONE: i64 = 0 |
| 168 | const NX_ETG_CLAIM_CPUID: i64 = 1 |
| 169 | const NX_ETG_CLAIM_HWCAP: i64 = 2 |
| 170 | const NX_ETG_CLAIM_VENDOR_DOC: i64 = 3 |
| 171 | const NX_ETG_CLAIM_DRIVER_ICD: i64 = 4 |
| 172 | const NX_ETG_CLAIM_KMD: i64 = 5 |
| 173 | const NX_ETG_CLAIM_LEVEL_ZERO: i64 = 6 |
| 174 | const NX_ETG_CLAIM_KFD: i64 = 7 |
| 175 | const NX_ETG_CLAIM_BAR_ENUM: i64 = 8 |
| 176 | const NX_ETG_CLAIM_MARKETING_SLICK: i64 = 9 |
| 177 | const NX_ETG_CLAIM_LICENSE_SERVER: i64 = 10 |
| 178 | const NX_ETG_CLAIM_SPORE_HINT: i64 = 11 // hint from prior device's calibration |
| 179 | const NX_ETG_CLAIM_PRIOR_CALIBRATION: i64 = 12 // this device's earlier probe |
| 180 | const NX_ETG_CLAIM_N: i64 = 13 |
functions
| 84 | func nx_etg_outcome_is_valid(o: i64) -> i64 |
| 90 | func nx_etg_outcome_name(o: i64) -> *u8 |
| 114 | func nx_etg_outcome_implies_reclamation(o: i64) -> i64 |
| 155 | func nx_etg_probe_is_valid(p: i64) -> i64 |
| 182 | func nx_etg_claim_is_valid(c: i64) -> i64 |
| 223 | func nx_etg_attestation_hash(e: *NxEtgEntry) -> i64 |
| 241 | func nx_etg_attestation_deterministic(a: *NxEtgEntry, b: *NxEtgEntry) -> i64 |
| 251 | func nx_etg_entry_init( |
| 287 | func nx_etg_entry_reclamation_delta(e: *NxEtgEntry) -> i64 |