code wiki / _hdl_build / nx_evidence.nx

nx_evidence.nx

buildroot/runtime/_hdl_build/nx_evidence.nx

7187 B150 linesdepth 7pulls 10 transitivereach 3 importersview sourcekind tooltopic evidence
docsdependenciesstructsconstsfunctions

about

nx_evidence.nx -- GRADED EVIDENCE ADMISSION for the dmkt lane. ★★THE DEFECT THIS FIXES IS MY OWN, FOUND HOURS AFTER SHIPPING IT. nx_gonogo's demand gate counted ROWS IN A PLANE. A row count is not evidence: ten rows harvested from one interest are an ECHO of that interest, not corroboration, and nothing stopped a CPSC recall (failure-mode evidence) from being counted as DEMAND evidence and flipping the verdict to GO. **A COUNT IS NOT A MEASUREMENT OF TRUTH, IT IS A MEASUREMENT OF HARVESTING EFFORT.** The estate already had the answer and the lane was not using it: nx_source_grade (45/45 gate) is a source-criticism library encoding NATO/Admiralty reliability x credibility, first-party distance, research-method rung, and -- the sharp one -- the INDEPENDENCE RULE: a claim is corroborated only across >=2 DISTINCT incentive classes; same-class agreement is an echo of one interest. This organ is that library applied where the decision actually gets made. ADMISSION IS THEREFORE THREE TESTS, ALL OF WHICH MUST PASS: 1. VALID -- grades in range. Out-of-range is a DEFECT, never a default (sg_score_permil = -1). 2. ACTIONABLE -- Admiralty F reliability or 6 credibility are honest cannot-judge states and are NEVER actionable. They owe a fetch-task rather than a verdict. 3. INDEPENDENT -- >=2 distinct incentive classes among the admitted rows, or the whole class of evidence resolves to ECHO and COUNTS AS ZERO. Uncorroborated evidence is not weak evidence; for a go/no-go it is no evidence. So `count` returns 0 for a plane full of same-class rows. That is the point: it makes nx_gonogo say BLOCKED-ON-EVIDENCE when the evidence is real but incestuous, which is the failure mode that actually kills products. DATA, NOT CODE (rule 11). Plane row `evidence-`: <id> TAB <class> TAB <incentive_class> TAB <rel 1-6> TAB <cred 1-6> TAB <party 1-3> TAB <method 1-5> TAB <source_url> TAB <claim> class : demand | failure | cost | regulatory (WHAT the row is evidence OF) incentive_class: 1 gov 2 vendor 3 consumer 4 media 5 academic 6 platform Two rows may agree loudly and still be one voice; the incentive_class is what detects that. VERBS: nx_evidence admit <planeprefix> <class> -> per-row grading + corroboration verdict (JSON) nx_evidence count <planeprefix> <class> -> ONE integer: admitted rows, or 0 if not corroborated license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_sourcing_path.nx nx_source_grade.nx nx_evidence.nx nx_evidence_gate.nx nx_gonogo.nx

imports: nx_syscalls.nxnx_sourcing_path.nxnx_source_grade.nx

imported by: nx_evidence_gate.nxnx_gonogo.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main spw sys_write sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ lc_eq ev_admit sys_mmap ↻ sp_rowcount sp_row_start lc_extract lc_eq ↻ sp_num lc_extract ↻ lc_atoi sg_score_permil sg_valid sg_rel_permil sg_cred_permil sg_party_permil sg_method_permil sg_actionable lc_lit

structs

none

consts

42const EV_MAXROWS: i64 = 128
43const EV_BUF: i64 = 65536
44const EV_CORROB_MIN_CLASSES: i64 = 2

functions

47func ev_admit(buf: *u8, n: i64, class: *u8, scratch: *u8, k: *i64) -> i64
93func ev_count(buf: *u8, n: i64, class: *u8, scratch: *u8) -> i64
called by 1: main calls 2: sys_mmapev_admit
100func main(argc: i64, argv: *i64) -> i64