nx_arxiv_census_gate.nx source
↩ module page · 75 lines · 4875 B
1// nx_arxiv_census_gate.nx -- teeth for the arXiv population-census decision core.
2// Drives nx_arxiv_census_lib IN-PROCESS, so the gate and the CLI cannot disagree: there is exactly one
3// ac_verdict in the estate and both call it. Emits every value it tests via gv_kv, because a gate that
4// prints only PASS is unfalsifiable from the outside.
5// license_tier: ORIGINAL No hw writes (Rule 26).
6import "nx_gate_verdict.nx"
7import "nx_arxiv_census_lib.nx"
8import "nx_syscalls.nx"
9
10// The REAL populations measured on 2026-09-06 and cited by the sotabar rows on lang.plan. Using the live
11// numbers rather than invented ones means a change in what we published shows up HERE as a failing tooth.
12const G_CSSE_TOTAL: i64 = 55
13const G_CSSE_DELIVERED: i64 = 55
14const G_CSPL_TOTAL: i64 = 14
15const G_CSPL_DELIVERED: i64 = 14
16const G_SLM_TOTAL: i64 = 35
17const G_SLM_DELIVERED: i64 = 35
18const G_SLOTCAP: i64 = 4096
19const G_TRUNC_DELIVERED: i64 = 10 // what max_results=10 would have delivered against cs.SE
20const G_NO_TOTAL: i64 = 0-1
21
22func main(argc: i64, argv: *i64) -> i64 {
23 let ctr: *i64 = gv_ctr()
24 gv_head("nx_arxiv_census -- does totalResults reconcile against entries delivered" as *u8)
25
26 // --- the three windows this session actually published, all of which MUST read COMPLETE ---
27 gv_check_eq("T1 cs.SE Sept 1-7 reconciles and reads COMPLETE", ac_verdict(G_CSSE_TOTAL, G_CSSE_DELIVERED, G_SLOTCAP), ACV_COMPLETE, ctr)
28 gv_check_eq("T2 cs.PL Sept 1-7 reconciles and reads COMPLETE", ac_verdict(G_CSPL_TOTAL, G_CSPL_DELIVERED, G_SLOTCAP), ACV_COMPLETE, ctr)
29 gv_check_eq("T3 small-language-model window reconciles and reads COMPLETE", ac_verdict(G_SLM_TOTAL, G_SLM_DELIVERED, G_SLOTCAP), ACV_COMPLETE, ctr)
30
31 // --- the failing directions, each of which MUST be named rather than passing ---
32 gv_check_eq("T4 a truncated window reads CAPPED, never COMPLETE", ac_verdict(G_CSSE_TOTAL, G_TRUNC_DELIVERED, G_SLOTCAP), ACV_CAPPED, ctr)
33 gv_check_eq("T5 hitting our OWN slot cap reads CAPPED", ac_verdict(99999, G_SLOTCAP, G_SLOTCAP), ACV_CAPPED, ctr)
34 gv_check_eq("T6 an absent totalResults reads UNREADABLE, not COMPLETE", ac_verdict(G_NO_TOTAL, G_CSSE_DELIVERED, G_SLOTCAP), ACV_UNREADABLE, ctr)
35 gv_check_eq("T7 delivered exceeding totalResults reads UNREADABLE", ac_verdict(50, 55, G_SLOTCAP), ACV_UNREADABLE, ctr)
36
37 // --- reason fidelity: the verdict and the sentence printed beside it are derived from ONE reason ---
38 gv_check_eq("T8 reason for a reconciling window is ACR_OK", ac_reason(G_CSSE_TOTAL, G_CSSE_DELIVERED, G_SLOTCAP), ACR_OK, ctr)
39 gv_check_eq("T9 reason for a truncated window is ACR_REMOTE_CAP", ac_reason(G_CSSE_TOTAL, G_TRUNC_DELIVERED, G_SLOTCAP), ACR_REMOTE_CAP, ctr)
40 gv_check_eq("T10 reason for our own cap is ACR_LOCAL_CAP", ac_reason(99999, G_SLOTCAP, G_SLOTCAP), ACR_LOCAL_CAP, ctr)
41 gv_check_eq("T11 every reason maps to its verdict", ac_verdict_of_reason(ac_reason(G_CSSE_TOTAL, G_TRUNC_DELIVERED, G_SLOTCAP)), ACV_CAPPED, ctr)
42
43 // --- boundary: the local cap must not fire one entry early and steal a COMPLETE ---
44 gv_check_eq("T12 delivered one below the slot cap still reads COMPLETE", ac_verdict(G_SLOTCAP-1, G_SLOTCAP-1, G_SLOTCAP), ACV_COMPLETE, ctr)
45
46 // --- neg-control: an off-by-one population must NOT read COMPLETE. A ruler that returns COMPLETE for
47 // --- everything would pass T1-T3 and T12 and is killed only here and by T4-T7.
48 let nc: i64 = ac_verdict(G_CSSE_TOTAL+1, G_CSSE_DELIVERED, G_SLOTCAP)
49 var nc_ok: i64 = 0
50 if nc!=ACV_COMPLETE { nc_ok = 1 }
51 gv_check("neg-control-off-by-one-population-is-not-COMPLETE" as *u8, nc_ok, ctr)
52
53 // --- anti-vacuity: an implementation that always answers CAPPED would pass every negative tooth.
54 // --- T1-T3 and T12 are the ones that kill it, and this tooth states that dependency out loud.
55 var av_ok: i64 = 0
56 if ac_verdict(G_CSPL_TOTAL, G_CSPL_DELIVERED, G_SLOTCAP)==ACV_COMPLETE { if nc!=ACV_COMPLETE { av_ok = 1 } }
57 gv_check("anti-vacuity-ruler-separates-COMPLETE-from-not-COMPLETE" as *u8, av_ok, ctr)
58
59 gv_values_head()
60 gv_kv("csSE_total" as *u8, G_CSSE_TOTAL)
61 gv_kv("csSE_delivered" as *u8, G_CSSE_DELIVERED)
62 gv_kv("csPL_total" as *u8, G_CSPL_TOTAL)
63 gv_kv("csPL_delivered" as *u8, G_CSPL_DELIVERED)
64 gv_kv("slm_total" as *u8, G_SLM_TOTAL)
65 gv_kv("slm_delivered" as *u8, G_SLM_DELIVERED)
66 gv_kv("slot_cap" as *u8, G_SLOTCAP)
67 gv_kv("verdict_complete_code" as *u8, ACV_COMPLETE)
68 gv_kv("verdict_capped_code" as *u8, ACV_CAPPED)
69 gv_kv("verdict_unreadable_code" as *u8, ACV_UNREADABLE)
70 gv_kv("neg_control_verdict" as *u8, nc)
71
72 let rc: i64 = gv_verdict("ARXIV-CENSUS-GATE" as *u8, ctr, "totalResults reconciles against entries delivered, and every non-reconciling shape is NAMED rather than passing" as *u8)
73 sys_exit(rc)
74 return rc
75}