code wiki / _hdl_build / nx_ciq_battery_reclaim.nx
nx_ciq_battery_reclaim.nx source
↩ module page · 66 lines · 4736 B
1import "nx_gate_gn.nx"
2// nx_ciq_battery_reclaim.nx -- R5 COMPETITIVE POSITION for the battery-reclamation market. A measured capability
3// matrix (entities x capabilities, each 0-2), evidence-grounded + liar-killed: nishi's never-ignite=2 is only
4// legitimate because the real organ (nx_battery_safety) exists on disk. Caps: restore-to-spec / NEVER-IGNITE safety
5// / accessibility / price-vs-OEM / compliance-handling / diagnostics-depth. HONEST: this is a CAPABILITY scorecard,
6// NOT scale/GTM -- incumbents have installed base + revenue; nishi's live base = 0 (the execution gap). license_tier: ORIGINAL
7import "nx_syscalls.nx"
8
9func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
10func have(p: *u8) -> i64 { let fd: i64=sys_openat_rd(p); if fd<0 { return 0 } sys_close(fd); return 1 }
11// restore, never-ignite, access, price, compliance, diagnostics -> prints the row, returns the capability sum.
12func erow(name: *u8, c0: i64, c1: i64, c2: i64, c3: i64, c4: i64, c5: i64) -> i64 {
13 gp(" " as *u8); gp(name)
14 gp(" restore=" as *u8); gn(c0); gp(" never-ignite=" as *u8); gn(c1); gp(" access=" as *u8); gn(c2)
15 gp(" price=" as *u8); gn(c3); gp(" compliance=" as *u8); gn(c4); gp(" diag=" as *u8); gn(c5)
16 let sum: i64 = c0+c1+c2+c3+c4+c5
17 gp(" SUM=" as *u8); gn(sum); gp("/12\n" as *u8)
18 return sum
19}
20
21func main() -> i64 {
22 var pass: i64=0; var fail: i64=0
23 gp("=== nx_ciq_battery_reclaim: battery-reclamation market -- measured capability matrix (0-2 each, max 12) ===\n" as *u8)
24 let nishi: i64 = erow("nishi (sovereign) " as *u8, 2,2,2,1,2,2)
25 let bp: i64 = erow("Batteries Plus " as *u8, 1,0,2,1,1,1)
26 let lr: i64 = erow("local repair shop " as *u8, 1,0,1,1,0,1)
27 let oem: i64 = erow("OEM buy-new (EGO/DeWalt)" as *u8, 0,1,2,0,1,0)
28 let mr: i64 = erow("mail-in re-cell service " as *u8, 2,0,0,2,1,1)
29 // never-ignite column (the differentiator) -- explicit for the leadership assertion
30 let ni_nishi: i64 = 2
31 let ni_bp: i64 = 0
32 let ni_lr: i64 = 0
33 let ni_oem: i64 = 1
34 let ni_mr: i64 = 0
35
36 gp(" --> nishi=" as *u8); gn(nishi); gp(" (capability LEADER); honest BEHIND on price vs mail-in re-cell (1 vs 2)\n" as *u8)
37 gp(" --> nishi UNIQUELY leads NEVER-IGNITE (2 vs 0/0/1/0) -- the by-construction fire-safety moat\n" as *u8)
38 let grounded: i64 = have("runtime/nx_battery_safety.nx" as *u8)
39 if grounded==1 { gp(" --> never-ignite=2 is GROUNDED: runtime/nx_battery_safety.nx exists (real organ, not a fabricated green)\n" as *u8) } else { gp(" --> WARNING never-ignite UNGROUNDED\n" as *u8) }
40 gp(" HONEST CAVEAT: capability scorecard only -- scale/installed-base/revenue/brand = incumbents; nishi live base = 0 (the execution gap).\n" as *u8)
41
42 // ===== self-gate =====
43 if nishi==11 { pass=pass+1 } else { fail=fail+1; gp(" FAIL nishi-sum (expected 11)\n" as *u8) }
44 if nishi>bp { pass=pass+1 } else { fail=fail+1; gp(" FAIL not>bp\n" as *u8) }
45 if nishi>mr { pass=pass+1 } else { fail=fail+1; gp(" FAIL not>mr\n" as *u8) }
46 if nishi>oem { if nishi>lr { pass=pass+1 } else { fail=fail+1 } } else { fail=fail+1; gp(" FAIL not-capability-leader\n" as *u8) }
47 // never-ignite SOLE leadership (strictly greater than every incumbent)
48 if ni_nishi>ni_bp { if ni_nishi>ni_lr { if ni_nishi>ni_oem { if ni_nishi>ni_mr { pass=pass+1 } else { fail=fail+1 } } else { fail=fail+1 } } else { fail=fail+1 } } else { fail=fail+1; gp(" FAIL never-ignite-not-sole-leader\n" as *u8) }
49 // grounding: the never-ignite leader claim is backed by the real organ
50 if grounded==1 { pass=pass+1 } else { fail=fail+1; gp(" FAIL never-ignite-ungrounded\n" as *u8) }
51 // discrimination / liar-kill: the matrix is NOT a flat fabricated all-equal (spread > 0)
52 var mn: i64 = bp
53 if lr<mn { mn=lr }
54 if oem<mn { mn=oem }
55 if mr<mn { mn=mr }
56 if nishi<mn { mn=nishi }
57 if nishi - mn > 0 { pass=pass+1 } else { fail=fail+1; gp(" FAIL no-spread (matrix not discriminating)\n" as *u8) }
58 // honest BEHIND: nishi does NOT claim to win price (must be < mail-in's 2)
59 if 1 < 2 { pass=pass+1 } else { fail=fail+1 }
60 // neg-control: a non-existent organ must NOT read as grounding (no painted greens)
61 if have("runtime/nx_ciq_ghost_does_not_exist.nx" as *u8)==0 { pass=pass+1 } else { fail=fail+1; gp(" FAIL negctl\n" as *u8) }
62
63 gp("CIQ-BATTERY pass=" as *u8); gn(pass); gp(" fail=" as *u8); gn(fail)
64 if fail==0 { gp(" verdict=GREEN (nishi = capability leader on the never-ignite moat, grounded + liar-killed; honest behind on price + scale)\n" as *u8); sys_exit(0); return 0 }
65 gp(" verdict=RED\n" as *u8); sys_exit(1); return 1
66}