code wiki / _hdl_build / nx_research_critic.nx
nx_research_critic.nx source
↩ module page · 68 lines · 6743 B
1// nx_research_critic.nx -- run the NISHI CRITIC (nx_critic: Popper/Kuhn/Lakatos adversarial-scientific grading)
2// over the RESEARCH-AUTONOMY ORCHESTRATION claims built this arc, so no claim is "accepted as a commandment from
3// God": each is graded LAW / THEORY / CONTESTED / REFUTED from its real evidence (independent reproductions,
4// counter-theory strength, whether an adversarial refutation hunt was actually run), with settledness + act-
5// confidence + blind-spot flags. The evidence below is the HONEST session record (not inflated). The Critic
6// evaluates/flags; the Researcher hunts counters; the Builder fixes what's demoted. expect_exit: 0 license_tier: ORIGINAL
7import "nx_critic.nx"
8
9func rc_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
10func rc_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
11func rc_verdict(s: i64) -> i64 {
12 if s == CRIT_REFUTED { rc_puts("REFUTED " as *u8); return 0 }
13 if s == CRIT_LAW { rc_puts("LAW " as *u8); return 0 }
14 if s == CRIT_CONTESTED{ rc_puts("CONTESTED" as *u8); return 0 }
15 rc_puts("THEORY " as *u8); return 0
16}
17
18// grade one claim from its evidence: reproductions, counter (reproductions,sources), redteamed.
19// returns status. Prints: VERDICT settled=.. conf=.. [BLINDSPOT] name
20func rc_grade(name: *u8, reproductions: i64, c_reps: i64, c_srcs: i64, redteamed: i64) -> i64 {
21 let cs: i64 = crit_counter_strength(c_reps, c_srcs)
22 let status: i64 = crit_status2(reproductions, cs, redteamed)
23 let settled: i64 = crit_settledness(reproductions, cs, redteamed)
24 var counters: i64 = 0
25 if cs >= 2 { counters = 1 }
26 let conf: i64 = crit_act_confidence(reproductions, counters, redteamed)
27 let bs: i64 = crit_is_blindspot(reproductions, redteamed)
28 rc_puts(" "); rc_verdict(status)
29 rc_puts(" settled="); rc_num(settled); rc_puts("/1000 conf="); rc_num(conf); rc_puts("/1000")
30 if bs == 1 { rc_puts(" [BLIND-SPOT: reproduced, NOT red-teamed -> hunt counters]" as *u8) }
31 rc_puts(" "); rc_puts(name); rc_puts("\n" as *u8)
32 return status
33}
34
35func main() -> i64 {
36 rc_puts("=== nx_research_critic: the Nishi Critic grades the autonomy orchestration (all verdicts PROVISIONAL) ===\n" as *u8)
37 var law: i64=0; var theory: i64=0; var contested: i64=0; var refuted: i64=0
38
39 // claim, reproductions, counter_reproductions, counter_sources, redteamed -- HONEST session evidence
40 var s: i64 = 0
41 // 1) engine ingest fix (sized vocab + full-corpus bound): live rebuild + search_cli 36->151 = 2 indep; bugs caught
42 s = rc_grade("engine-ingest-fix (sized-vocab + total-bound)" as *u8, 2, 0, 0, 1); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
43 // 2) content-dedup no-data-loss: controlled test + real corpus = 2; the 64-byte-hash bug was the red-team
44 s = rc_grade("content-dedup + cross-topic (no data loss)" as *u8, 2, 0, 0, 1); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
45 // 3) conductor governance: registry gate 6/6 + conduct ADMISSION=1 = 2; T3/T4 neg-controls = red-team
46 s = rc_grade("conductor governance (cycle registered+admitted)" as *u8, 2, 0, 0, 1); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
47 // 4) self-improving loop CLOSES (gaps resolve on growth): shown ONCE; nonsense-stays-flagged = the control
48 s = rc_grade("self-improving loop closes (gaps resolve)" as *u8, 1, 0, 0, 1); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
49 // 5) daemon survives the LAUNCHER (self-daemonize fork+setsid): detached wrote 3 polls = 1 reproduction; red-teamed by the reap failure
50 s = rc_grade("daemon survives launcher (self-daemonize)" as *u8, 1, 0, 0, 1); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
51 // 6) daemon durable ACROSS reboot: a MODERATE surviving counter (wsl --shutdown kills it, reproduced) -> CONTESTED
52 s = rc_grade("daemon durable across wsl-restart/reboot" as *u8, 0, 1, 2, 1); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
53 // 7) monthly cadence fires the cycle END-TO-END: NOT observed (fire is ~30d out); fire-path proven but not the monthly e2e
54 s = rc_grade("monthly cadence fires cycle (end-to-end)" as *u8, 0, 0, 0, 0); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
55 // 8) one-pass recurring work conductor-governed: AFTER the audit-driven convergence, 9/11 governed (5 one-pass pulses registered); only 2 forever-daemons remain (a DIFFERENT class, launch-governed) -> weak counter, audit WAS run = red-teamed
56 s = rc_grade("one-pass recurring work conductor-governed (9/11; 2 daemons separate)" as *u8, 1, 1, 0, 1); if s==CRIT_LAW{law=law+1} else { if s==CRIT_CONTESTED{contested=contested+1} else { if s==CRIT_REFUTED{refuted=refuted+1} else {theory=theory+1} } }
57
58 rc_puts("\n CRITIC TALLY: LAW="); rc_num(law); rc_puts(" THEORY="); rc_num(theory)
59 rc_puts(" CONTESTED="); rc_num(contested); rc_puts(" REFUTED="); rc_num(refuted); rc_puts("\n" as *u8)
60 rc_puts(" CRITIC FEEDBACK (the honest next work):\n" as *u8)
61 rc_puts(" - CONTESTED 'daemon durable across reboot' -> RESOLVE: add a relaunch-on-boot OS hook (the one piece outside Nishi).\n" as *u8)
62 rc_puts(" - 'one-pass recurring work governed' improved CONTESTED->THEORY: 9/11 converged this session (5 pulses registered); remaining = govern the 2 forever-daemons at launch + a 2nd reproduction for LAW.\n" as *u8)
63 rc_puts(" - THEORY 'loop closes' / 'daemon survives launcher' -> need a 2nd INDEPENDENT reproduction to reach LAW.\n" as *u8)
64 rc_puts(" - THEORY 'monthly cadence e2e' (conf low) -> NOT verified end-to-end (fire ~30d out); do not claim it as proven.\n" as *u8)
65 rc_puts(" - HUMILITY AXIOM: every verdict above is PROVISIONAL; each LAW keeps a successor slot open.\n" as *u8)
66 rc_puts(" CRITIC-OK\n" as *u8)
67 sys_exit(0); return 0
68}