code wiki / (root) / nx_evprofile_lib.nx

nx_evprofile_lib.nx

buildroot/runtime/nx_evprofile_lib.nx

32736 B583 linesdepth 3pulls 3 transitivereach 68 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_evprofile_lib.nx -- THE ONE VOCABULARY AND THE ONE READER for the /compare EVIDENCE PROFILE. WHY THIS EXISTS (measured 2026-08-31). nx_swcompare_evidence ALREADY COMPUTES the whole gap profile of every domain and THROWS MOST OF IT AWAY: ev_scan classifies four row states (GROUNDED / UNGROUNDED / GAP-WATCH / LANDED) and prints the LANDED label WITHOUT COUNTING IT; ev_gates extracts pass=N/M and folds GREEN without ever looking at M. The stamp it materialises carries ten numbers, none of which name a REMEDY, so every consumer of that stamp can say a board is RED and none can say WHY -- and the verdict line itself is a bare disjunction (an ungrounded claim, dead gate, or neg-control leak) that never names its failing conjunct, so the reader always guesses the alarming third. A COUNT WITHOUT A WORKLIST IS NOT ACTIONABLE, AND A WORKLIST WITHOUT ITS REASON IS STILL ONE STEP SHORT. WHY A LIB AND NOT A PLANE. The obvious shape was producer -> sovereign plane -> PM board, and it was REJECTED on this estate's own law: WHEN TWO ORGANS MUST AGREE, MAKE DISAGREEMENT IMPOSSIBLE BY CONSTRUCTION RATHER THAN BY DISCIPLINE. A plane is a SECOND artifact of the same measurement, i.e. a producer/consumer WIRE, and every wire on this estate has eventually drifted (rm_field line-anchoring, the roi- ordinals, overall_permil= versus permil). There is exactly ONE evidence artifact -- the stamp the referee already writes -- and this lib is the ONLY thing that spells its keys or reads them. The referee IMPORTS these same key literals to WRITE them, so writer and reader cannot disagree about the wire: there is only one of it. It also avoids importing the 194 KB segment store into a referee that runs 96 times a beat, and avoids taking a plane lock on a box already under I/O pressure. ABSTAIN, NEVER ACQUIT. A stamp written before this change carries none of the profile keys. Every accessor returns -1 for an absent key and evp_parse sets EVP_F_V to 1, so a v1 stamp reads as UNKNOWN rather than as a domain with zero gaps. A ZERO-FILLED PROFILE IS A FABRICATED CONSTANT WEARING THE SHAPE OF A MEASUREMENT, and it fails in the flattering direction, which is the direction nobody audits. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 24 importers

nx_syscalls.nx nx_estate_path.nx nx_evprofile_lib.nx nx_compare_growth_matrix_full_2026 nx_compare_shared_fit_lib_20260910 nx_compare_shared_fit_matrix_20260 nx_evidence_fleet.nx nx_evidence_fleet_t138.nx nx_evidence_profile_gate.nx nx_pm_board.nx nx_sota_status.nx nx_swcompare_evidence.nx nx_swcompare_evidence_lib_t138.nx

diagram shows first 10 each side; +0 more imports, +14 more importers in the complete lists below.

imports: nx_syscalls.nxnx_estate_path.nx

imported by: nx_compare_growth_matrix_full_20260910.nxnx_compare_shared_fit_lib_20260910.nxnx_compare_shared_fit_matrix_20260910.nxnx_evidence_fleet.nxnx_evidence_fleet_t138.nxnx_evidence_profile_gate.nxnx_pm_board.nxnx_sota_status.nxnx_swcompare_evidence.nxnx_swcompare_evidence_lib_t138.nxnx_swcompare_evidence_matrix_t138.nxnx_swcompare_growth_candidate_20260910.nxnx_swcompare_heading_lib_20260907.nxnx_swcompare_heading_matrix_20260907.nxnx_swcompare_ladder_candidate.nxnx_swcompare_lib.nxnx_swcompare_matrix.nxnx_swcompare_matrix_ladder_test_20260907.nxnx_swcompare_matrix_rank_guard_t162.nxnx_swcompare_preview_lib_t56.nxnx_swcompare_preview_matrix_t56.nxnx_swcompare_production_lib_20260907.nxnx_swcompare_production_matrix_20260907.nxnx_swcompare_release_candidate.nx

structs

none

consts

31const EVP_PATH_CAP: i64 = 512
35const EVP_STAMP_CAP: i64 = 4096
36const EVP_WORD_CAP: i64 = 64
38const EVP_STAMP_PRE: *u8 = "knowledge/status/evstamp_"
39const EVP_STAMP_SUF: *u8 = ".verdict"
46const EVP_K_OK: *u8 = "ok="
47const EVP_K_EPOCH: *u8 = " epoch="
48const EVP_K_GROUNDED: *u8 = " grounded="
49const EVP_K_GATES: *u8 = " gates="
50const EVP_K_SKIPPED: *u8 = " skipped="
51const EVP_K_DECLARED: *u8 = " declared="
52const EVP_K_HASHED: *u8 = " hashed="
53const EVP_K_REDSEEN: *u8 = " redseen="
54const EVP_K_UNGROUNDED: *u8 = " ungrounded="
55const EVP_K_ABSENT: *u8 = " absent="
56const EVP_K_ABSNAMED: *u8 = " absent_named="
57const EVP_K_ABSBARE: *u8 = " absent_bare="
58const EVP_K_LANDED: *u8 = " landed="
59const EVP_K_VACUOUS: *u8 = " vacuous="
60const EVP_K_CONJ: *u8 = " conj="
61const EVP_K_MROOT: *u8 = " mroot="
62const EVP_K_MBYTES: *u8 = " mbytes="
63const EVP_K_MCAP: *u8 = " mcapped="
64const EVP_K_GATESROOT: *u8 = " gatesroot="
69const EVP_K_WITHHELD: *u8 = " withheld="
70const EVP_K_WHREF: *u8 = " withheld_refused="
90const EVP_K_UNPROVEN: *u8 = " unproven="
91const EVP_K_UNPREASON: *u8 = " unproven_reason="
109const EVP_K_ABSTAIN: *u8 = " abstain="
137const EVP_K_AXES: *u8 = " axes="
138const EVP_K_CLAIMED: *u8 = " claimed="
148const EVP_K_ABSTAIN_WATCH: *u8 = " abstain_watch="
151const EVP_F_OK: i64 = 0
152const EVP_F_EPOCH: i64 = 1
153const EVP_F_GROUNDED: i64 = 2
154const EVP_F_PRESENT: i64 = 3
155const EVP_F_GREEN: i64 = 4
156const EVP_F_RAN: i64 = 5
157const EVP_F_SKIPPED: i64 = 6
158const EVP_F_DECLARED: i64 = 7
159const EVP_F_HASHED: i64 = 8
160const EVP_F_REDSEEN: i64 = 9
161const EVP_F_UNGROUND: i64 = 10
162const EVP_F_ABSENT: i64 = 11
163const EVP_F_ABSNAMED: i64 = 12
164const EVP_F_ABSBARE: i64 = 13
165const EVP_F_LANDED: i64 = 14
166const EVP_F_VACUOUS: i64 = 15
167const EVP_F_MBYTES: i64 = 16
168const EVP_F_MCAPPED: i64 = 17
169const EVP_F_MROOT: i64 = 18
170const EVP_F_GATESROOT: i64 = 19
171const EVP_F_CJ_G: i64 = 20
172const EVP_F_CJ_P: i64 = 21
173const EVP_F_CJ_Q: i64 = 22
174const EVP_F_CJ_N: i64 = 23
175const EVP_F_V: i64 = 24
176const EVP_F_WITHHELD: i64 = 25
177const EVP_F_WHREF: i64 = 26
178const EVP_NF: i64 = 27
181const EVP_TREE_NONE: i64 = 0
182const EVP_TREE_PRIMARY: i64 = 1
183const EVP_TREE_BUILD: i64 = 2
185const EVP_FL_AMBIG: i64 = 0
186const EVP_FL_BRIM: i64 = 1
187const EVP_NFLAG: i64 = 2
189const EVP_RC_UNRESOLVED: i64 = 0 - 1
190const EVP_RC_AMBIGUOUS: i64 = 0 - 2
192const EVP_TTL_DEFAULT: i64 = 604800
193const EVP_CONF_CAP: i64 = 4096

functions

195func evp_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: evp_find
197func evp_cat(dst: *u8, off: i64, s: *u8) -> i64
207func evp_path(out: *u8, dom: *u8) -> i64
called by 2: evp_loadev_stamp calls 1: evp_cat
214func evp_read(path: *u8, buf: *u8, cap: i64) -> i64
228func evp_find(buf: *u8, n: i64, key: *u8) -> i64
242func evp_digits(buf: *u8, n: i64, p: i64, endp: *i64) -> i64
called by 2: evp_numevp_num_pair
258func evp_num(buf: *u8, n: i64, key: *u8) -> i64
266func evp_num_pair(buf: *u8, n: i64, key: *u8, out2: *i64) -> i64
279func evp_word(buf: *u8, n: i64, key: *u8, dst: *u8, cap: i64) -> i64
called by 2: evp_parsess_stamp_load calls 1: evp_find
299func evp_streq(a: *u8, b: *u8) -> i64
called by 3: mainmainevp_tree_of
306func evp_upper(c: i64) -> i64
called by 1: evp_parse
311func evp_tree_of(wd: *u8) -> i64
called by 1: evp_parse calls 1: evp_streq
318func evp_tree_name(t: i64) -> *u8
328func evp_conj_char(pass: i64, up: i64, lo: i64) -> i64 { if pass == 1 { return up } return lo }
330func evp_conj_name(idx: i64) -> *u8
339func evp_conj_fail(f: *i64) -> i64
361func evp_load(dom: *u8, buf: *u8, cap: i64, pathout: *u8, flags: *i64) -> i64
401func evp_parse(buf: *u8, n: i64, f: *i64) -> i64
459func evp_reconciles(f: *i64) -> i64
475func evp_claim_only(f: *i64) -> i64 { if f[EVP_F_RAN] == 0 { return 1 } return 0 }
487func evp_gate_failing_n(f: *i64) -> i64
493func evp_gate_failing(f: *i64) -> i64 { if evp_gate_failing_n(f) > 0 { return 1 } return 0 }
494func evp_gate_skipped(f: *i64) -> i64 { if f[EVP_F_SKIPPED] > 0 { return 1 } return 0 }
called by 2: mainpb_compare
500func evp_gate_unknown(f: *i64) -> i64
called by 2: mainpb_compare
518func evp_gates_reconcile(f: *i64) -> i64
called by 2: mainpb_compare
537func evp_ungrounded_claim(f: *i64) -> i64 { if f[EVP_F_UNGROUND] > 0 { return 1 } return 0 }
542func evp_fabricated(f: *i64) -> i64 { return evp_ungrounded_claim(f) }
543func evp_flip_ready(f: *i64) -> i64 { if f[EVP_F_LANDED] > 0 { return 1 } return 0 }
544func evp_unnamed_gap(f: *i64) -> i64 { if f[EVP_F_ABSBARE] > 0 { return 1 } return 0 }
555func evp_withheld(f: *i64) -> i64 { if f[EVP_F_WITHHELD] > 0 { return 1 } return 0 }
560func evp_withheld_refused(f: *i64) -> i64 { if f[EVP_F_WHREF] > 0 { return 1 } return 0 }
561func evp_vacuous_gate(f: *i64) -> i64 { if f[EVP_F_VACUOUS] > 0 { return 1 } return 0 }
566func evp_stale(f: *i64, now: i64, ttl: i64) -> i64
574func evp_ttl_sec() -> i64