code wiki / _hdl_build / nx_research_robustness_census.nx

nx_research_robustness_census.nx source

↩ module page · 78 lines · 5522 B

1// nx_research_robustness_census.nx -- R0 census of the SOVEREIGN RESEARCHER's robustness + multi- 2// agent maturity (operator: "build the nishi researcher up -- more robust, multiple agents, from the 3// hardware rung up"). Maps what EXISTS vs the GAPS, benchmarked where relevant against the Claude 4// deep-research workflow (the yardstick). Grades ABSENT->PRESENT->PARITY->EXCEEDS; liar-kill refuses 5// any PARITY/EXCEEDS without measured evidence; negative control proves it fires. 6// KEY measured exceed: NO API RATE LIMIT -- nx_connect_research_fetch got 10/10 live (status 200) 7// while the Claude deep-research wf_0e22ca98 got 0/22 (server rate-limited) in the same window. 8// 100% sovereign. license_tier: ORIGINAL expect_exit: 0 9import "nx_syscalls.nx" 10 11const G_ABSENT: i64 = 0 12const G_PRESENT: i64 = 1 13const G_PARITY: i64 = 2 14const G_EXCEEDS: i64 = 3 15 16func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 17func sn(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 as u8;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 } 18func grade_name(g: i64) -> i64 { 19 if g==G_ABSENT { sw("ABSENT " as *u8) } 20 if g==G_PRESENT { sw("PRESENT" as *u8) } 21 if g==G_PARITY { sw("PARITY " as *u8) } 22 if g==G_EXCEEDS { sw("EXCEEDS" as *u8) } 23 return 0 24} 25func cap_valid(grade: i64, has_ev: i64) -> i64 { if grade >= G_PARITY { if has_ev == 0 { return 0 } } return 1 } 26func row(cap: *u8, grade: i64, note: *u8, ev: *u8, has_ev: i64, tot: *i64) -> i64 { 27 sw(" " as *u8); sw(cap); sw(" -> " as *u8); grade_name(grade) 28 if cap_valid(grade, has_ev) == 0 { sw(" <== INVALID (LIAR-KILL)" as *u8); tot[4]=tot[4]+1 } 29 else { if has_ev == 1 { sw(" [ev: " as *u8); sw(ev); sw("]" as *u8) } } 30 sw(" {" as *u8); sw(note); sw("}\n" as *u8) 31 tot[grade]=tot[grade]+1 32 return 0 33} 34 35func main() -> i64 { 36 let tot: *i64 = sys_mmap(64) as *i64 37 tot[0]=0; tot[1]=0; tot[2]=0; tot[3]=0; tot[4]=0 38 39 sw("=== nx_research_robustness_census -- SOVEREIGN RESEARCHER maturity + multi-agent gaps ===\n" as *u8) 40 sw("grades: ABSENT<PRESENT<PARITY<EXCEEDS (PARITY/EXCEEDS need measured evidence)\n" as *u8) 41 42 sw("-- FETCH plane --\n" as *u8) 43 row("sovereign HTTPS fetch (own TLS-1.3 + Mozilla CA) " as *u8, G_PRESENT, "proven; no curl/wget" as *u8, "nx_https_fetch_follow" as *u8, 1, tot) 44 row("idempotent resumable batch fetch (have-skip) " as *u8, G_PRESENT, "re-runs fill gaps" as *u8, "nx_connect_research_fetch / nx_ge_research_fetch" as *u8, 1, tot) 45 row("NO API rate limit (availability) " as *u8, G_EXCEEDS, "vs Claude deep-research" as *u8, "10/10 live vs Claude wf_0e22ca98 0/22 rate-limited (MEASURED)" as *u8, 1, tot) 46 row("full sovereignty (no vendor API on the fetch path) " as *u8, G_EXCEEDS, "vs Claude deep-research (Anthropic API)" as *u8, "own TLS stack, 0 third-party" as *u8, 1, tot) 47 48 sw("-- VERIFY / EXTRACT plane --\n" as *u8) 49 row(">=2-source corroboration (no-hearsay) " as *u8, G_PRESENT, "" as *u8, "nx_research_corroborate (+gate)" as *u8, 1, tot) 50 row("digest + extract " as *u8, G_PRESENT, "" as *u8, "nx_research_digest / nx_research_extract" as *u8, 1, tot) 51 row("basic synthesis " as *u8, G_PRESENT, "" as *u8, "nx_research_synth" as *u8, 1, tot) 52 row("SEMANTIC synthesis (sovereign, no LLM) " as *u8, G_ABSENT, "LLM-dependent; partnership does it (Claude ahead)" as *u8, "none" as *u8, 0, tot) 53 row("ADVERSARIAL verify (sovereign 3-vote, no LLM) " as *u8, G_ABSENT, "LLM-dependent; partnership does it (Claude ahead)" as *u8, "none" as *u8, 0, tot) 54 55 sw("-- ROBUSTNESS / MULTI-AGENT plane (the build-up ladder) --\n" as *u8) 56 row("process-isolated fetch (fork->fetch->exit) " as *u8, G_ABSENT, "THE no-limits rung: leak dies with child (TLS mmap leak ~23/pass today)" as *u8, "none" as *u8, 0, tot) 57 row("multi-agent parallel fan-out (fork pool) " as *u8, G_ABSENT, "multiple fetch agents concurrent" as *u8, "none" as *u8, 0, tot) 58 row("arbitrated shared sink (flock) -- primitive exists " as *u8, G_PRESENT, "proven primitive; not yet wired to researcher" as *u8, "nx_arbiter (race gate 400/400)" as *u8, 1, tot) 59 60 sw("--- DISTRIBUTION ---\n" as *u8) 61 sw(" ABSENT=" as *u8); sn(tot[0]); sw(" PRESENT=" as *u8); sn(tot[1]); sw(" PARITY=" as *u8); sn(tot[2]); sw(" EXCEEDS=" as *u8); sn(tot[3]) 62 let total: i64 = tot[0]+tot[1]+tot[2]+tot[3] 63 sw(" TOTAL=" as *u8); sn(total); sw("\n" as *u8) 64 sw(" BUILD-UP LADDER (next rungs): process-isolated fetch -> multi-agent fan-out -> wire arbiter -> (later) sovereign semantic+adversarial extract.\n" as *u8) 65 sw(" invalid_rows=" as *u8); sn(tot[4]); sw("\n" as *u8) 66 67 var neg_ok: i64 = 1 68 if cap_valid(G_EXCEEDS, 0) != 0 { neg_ok = 0 } 69 if cap_valid(G_PRESENT, 0) != 1 { neg_ok = 0 } 70 sw(" NEG-CONTROL liar-kill fires: " as *u8); if neg_ok==1 { sw("YES\n" as *u8) } else { sw("NO\n" as *u8) } 71 72 var green: i64 = 0 73 if tot[4]==0 { if neg_ok==1 { green=1 } } 74 if green==1 { sw("VERDICT: GREEN (honest researcher census; no-rate-limit EXCEEDS measured; multi-agent rungs ABSENT, ladder set)\n" as *u8); sys_exit(0) } 75 sw("VERDICT: RED\n" as *u8) 76 sys_exit(1) 77 return 1 78}