code wiki / (root) / nx_competitive_state.nx

nx_competitive_state.nx

buildroot/runtime/nx_competitive_state.nx

11334 B279 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind librarytopic competitive
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_etg.nx nx_competitive_state.nx nx_competitive_state_test.nx

imports: nx_syscalls.nxnx_etg.nx

imported by: nx_competitive_state_test.nx

structs

132struct NxCompetitiveRecord

consts

49const NX_MAGIC_8192: i64 = 8192
50const NX_MAGIC_15564: i64 = 15564
51const NX_MAGIC_17204: i64 = 17204
52const NX_MAGIC_24576: i64 = 24576
58const NX_COMP_UNCLASSIFIED: i64 = 0 // no benchmark yet
59const NX_COMP_UNCOMPETITIVE: i64 = 1 // ≥2x worse than incumbent
60const NX_COMP_LAGGING: i64 = 2 // within 50-100% (still behind)
61const NX_COMP_PARITY: i64 = 3 // matches incumbent within ±5%
62const NX_COMP_LEADING: i64 = 4 // exceeds 5-50%
63const NX_COMP_DOMINATING: i64 = 5 // exceeds ≥50%
64const NX_COMP_STALE: i64 = 6 // benchmark older than entropy window
65const NX_COMP_REGRESSED_FROM_LEADING: i64 = 7 // was LEADING; incumbent caught up
66const NX_COMP_N: i64 = 8
104const NX_ENTROPY_WINDOW_NONE: i64 = 0 // no decay (standards-locked)
105const NX_ENTROPY_WINDOW_FAST: i64 = 1 // 30 days (LLM inference, GPU compute)
106const NX_ENTROPY_WINDOW_MID: i64 = 2 // 90 days (compiler perf, runtime)
107const NX_ENTROPY_WINDOW_SLOW: i64 = 3 // 365 days (numeric primitives)
108const NX_ENTROPY_WINDOW_N: i64 = 4

functions

68func nx_comp_is_valid(c: i64) -> i64
called by 1: main
74func nx_comp_name(c: i64) -> *u8
92func nx_comp_is_production_capable(c: i64) -> i64
called by 1: main
110func nx_entropy_window_is_valid(w: i64) -> i64
called by 1: main
118func nx_entropy_window_days(w: i64) -> i64
144func nx_comp_record_init(
called by 1: main
163func nx_comp_classify_ratio(perf_ratio_q14: i64) -> i64
173func nx_comp_record_measurement(
called by 1: main calls 1: nx_comp_classify_ratio
207func nx_comp_record_is_stale(
225func nx_comp_record_effective_state(
243func nx_comp_to_etg_outcome(
255func nx_comp_attest(