nx_competitive_state.nx
buildroot/runtime/nx_competitive_state.nx
about
nx_competitive_state.nx -- bits-up competitive-state classifier
for substrate primitives. Orthogonal axis to nx_trust_state.
Operationalizes the cardinal:
"how competitive is it and thats a thing that entropy hits
you cant just benchmark hit competitive and then rest but
thats what the industry does"
Per [[feedback-entropy-hits-competitive-never-rest]] cardinal:
every benchmarked primitive declares its competitive state +
timestamp + entropy_window in header. Stale benchmarks auto-
degrade to STALE until re-measurement. Continuous re-benchmark,
not one-shot.
Composes:
nx_etg.nx (NxEtgEntry attestation; competitive-state classifi-
cations emit ETG entries so the substrate's audit chain
carries competitive-state context)
nx_trust_state.nx (sibling primitive; this is the ORTHOGONAL
axis; a primitive's full health = (trust_state,
competitive_state))
[[feedback-bits-up-exceed-never-match]] (the substrate's
structural advantage is EXCEEDING; this cardinal says stay
exceeded, not just exceed once)
[[feedback-no-strawman-perf-comparisons]] (parent cardinal;
competitive state operationalizes honesty in comparisons)
**Trust State:** WRITTEN_UNTESTED (per nx_trust_state taxonomy;
brand-new in current session; not yet KAT-passed)
**Competitive State:** UNCLASSIFIED (no benchmark against
incumbent classifiers yet)
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_etg.nx
imported by: nx_competitive_state_test.nx
structs
| 132 | struct NxCompetitiveRecord |
consts
| 49 | const NX_MAGIC_8192: i64 = 8192 |
| 50 | const NX_MAGIC_15564: i64 = 15564 |
| 51 | const NX_MAGIC_17204: i64 = 17204 |
| 52 | const NX_MAGIC_24576: i64 = 24576 |
| 58 | const NX_COMP_UNCLASSIFIED: i64 = 0 // no benchmark yet |
| 59 | const NX_COMP_UNCOMPETITIVE: i64 = 1 // ≥2x worse than incumbent |
| 60 | const NX_COMP_LAGGING: i64 = 2 // within 50-100% (still behind) |
| 61 | const NX_COMP_PARITY: i64 = 3 // matches incumbent within ±5% |
| 62 | const NX_COMP_LEADING: i64 = 4 // exceeds 5-50% |
| 63 | const NX_COMP_DOMINATING: i64 = 5 // exceeds ≥50% |
| 64 | const NX_COMP_STALE: i64 = 6 // benchmark older than entropy window |
| 65 | const NX_COMP_REGRESSED_FROM_LEADING: i64 = 7 // was LEADING; incumbent caught up |
| 66 | const NX_COMP_N: i64 = 8 |
| 104 | const NX_ENTROPY_WINDOW_NONE: i64 = 0 // no decay (standards-locked) |
| 105 | const NX_ENTROPY_WINDOW_FAST: i64 = 1 // 30 days (LLM inference, GPU compute) |
| 106 | const NX_ENTROPY_WINDOW_MID: i64 = 2 // 90 days (compiler perf, runtime) |
| 107 | const NX_ENTROPY_WINDOW_SLOW: i64 = 3 // 365 days (numeric primitives) |
| 108 | const NX_ENTROPY_WINDOW_N: i64 = 4 |
functions
| 68 | func nx_comp_is_valid(c: i64) -> i64 called by 1: main |
| 74 | func nx_comp_name(c: i64) -> *u8 |
| 92 | func nx_comp_is_production_capable(c: i64) -> i64 called by 1: main |
| 110 | func nx_entropy_window_is_valid(w: i64) -> i64 called by 1: main |
| 118 | func nx_entropy_window_days(w: i64) -> i64 |
| 144 | func nx_comp_record_init( called by 1: main |
| 163 | func nx_comp_classify_ratio(perf_ratio_q14: i64) -> i64 |
| 173 | func nx_comp_record_measurement( |
| 207 | func nx_comp_record_is_stale( |
| 225 | func nx_comp_record_effective_state( |
| 243 | func nx_comp_to_etg_outcome( |
| 255 | func nx_comp_attest( |