code wiki / (root) / nx_etg.nx

nx_etg.nx

buildroot/runtime/nx_etg.nx

13633 B289 linesdepth 3pulls 3 transitivereach 24 importersview sourcekind librarytopic etg
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_fnv.nx nx_etg.nx nx_bench_core.nx nx_bench_core_test.nx nx_competitive_state.nx nx_competitive_state_test.nx nx_doc_census.nx nx_doc_census_real_audit_test.nx nx_doc_census_real_listing_test.nx nx_doc_census_run_test.nx nx_doc_census_test.nx nx_etg_byzantine.nx

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

194struct NxEtgEntry

consts

71const NX_ETG_OUTCOME_NONE: i64 = 0
72const NX_ETG_OUTCOME_CONFIRMED: i64 = 1 // doc agrees, silicon agrees
73const NX_ETG_OUTCOME_VENDOR_LIED_OMISSION: i64 = 2 // silicon does MORE than doc claimed
74const NX_ETG_OUTCOME_VENDOR_LIED_MISDIRECTION: i64 = 3 // silicon does DIFFERENT than doc claimed
75const NX_ETG_OUTCOME_FALSIFIED: i64 = 4 // doc claim failed
76const NX_ETG_OUTCOME_PAYWALLED_BUT_RESPONSIVE: i64 = 5 // gated feature responds to direct register
77const NX_ETG_OUTCOME_RECLAIMED: i64 = 6 // capability added to cost model after probe
78const NX_ETG_OUTCOME_INCONCLUSIVE: i64 = 7 // N-of-M probes disagree
79const NX_ETG_OUTCOME_THROTTLED: i64 = 8 // silicon stable above vendor max
80const NX_ETG_OUTCOME_FUSED_OFF: i64 = 9 // silicon refuses (vendor disabled at fuse)
81const NX_ETG_OUTCOME_UNDOCUMENTED_CAPABILITY: i64 = 10 // works but no spec coverage
82const NX_ETG_OUTCOME_N: i64 = 11
128const NX_ETG_PROBE_NONE: i64 = 0
129const NX_ETG_PROBE_CPU_ISA: i64 = 1
130const NX_ETG_PROBE_CPU_CLOCK: i64 = 2
131const NX_ETG_PROBE_CPU_CACHE: i64 = 3
132const NX_ETG_PROBE_CPU_SYSCALL: i64 = 4
133const NX_ETG_PROBE_CPU_POWER: i64 = 5
134const NX_ETG_PROBE_GPU_CU: i64 = 6
135const NX_ETG_PROBE_GPU_TENSOR: i64 = 7
136const NX_ETG_PROBE_GPU_CLOCK: i64 = 8
137const NX_ETG_PROBE_GPU_DMA: i64 = 9
138const NX_ETG_PROBE_GPU_THERMAL: i64 = 10
139const NX_ETG_PROBE_GPU_ISA: i64 = 11
140const NX_ETG_PROBE_STORAGE_NVME: i64 = 12
141const NX_ETG_PROBE_STORAGE_RAM: i64 = 13
142const NX_ETG_PROBE_NET_LINK: i64 = 14
143const NX_ETG_PROBE_NET_TLS: i64 = 15
144const NX_ETG_PROBE_NPU: i64 = 16
145const NX_ETG_PROBE_DSP: i64 = 17
149const NX_ETG_PROBE_AUDIT_TOOL_GENEALOGY: i64 = 18 // nx_tool_census
150const NX_ETG_PROBE_AUDIT_BIT_LEVEL: i64 = 19 // nx_bit_level_census
151const NX_ETG_PROBE_AUDIT_GENEALOGY_MAP: i64 = 20 // nx_genealogy_map
152const NX_ETG_PROBE_AUDIT_CROSS_ARCH: i64 = 21 // cross-arch parity
153const NX_ETG_PROBE_N: i64 = 22
167const NX_ETG_CLAIM_NONE: i64 = 0
168const NX_ETG_CLAIM_CPUID: i64 = 1
169const NX_ETG_CLAIM_HWCAP: i64 = 2
170const NX_ETG_CLAIM_VENDOR_DOC: i64 = 3
171const NX_ETG_CLAIM_DRIVER_ICD: i64 = 4
172const NX_ETG_CLAIM_KMD: i64 = 5
173const NX_ETG_CLAIM_LEVEL_ZERO: i64 = 6
174const NX_ETG_CLAIM_KFD: i64 = 7
175const NX_ETG_CLAIM_BAR_ENUM: i64 = 8
176const NX_ETG_CLAIM_MARKETING_SLICK: i64 = 9
177const NX_ETG_CLAIM_LICENSE_SERVER: i64 = 10
178const NX_ETG_CLAIM_SPORE_HINT: i64 = 11 // hint from prior device's calibration
179const NX_ETG_CLAIM_PRIOR_CALIBRATION: i64 = 12 // this device's earlier probe
180const NX_ETG_CLAIM_N: i64 = 13

functions

84func nx_etg_outcome_is_valid(o: i64) -> i64
90func nx_etg_outcome_name(o: i64) -> *u8
114func nx_etg_outcome_implies_reclamation(o: i64) -> i64
155func nx_etg_probe_is_valid(p: i64) -> i64
182func nx_etg_claim_is_valid(c: i64) -> i64
223func nx_etg_attestation_hash(e: *NxEtgEntry) -> i64
241func nx_etg_attestation_deterministic(a: *NxEtgEntry, b: *NxEtgEntry) -> i64
called by 2: mainmain calls 1: nx_etg_attestation_hash
251func nx_etg_entry_init(
287func nx_etg_entry_reclamation_delta(e: *NxEtgEntry) -> i64