code wiki / _hdl_build / nx_connect_honest_framing.nx
nx_connect_honest_framing.nx source
↩ module page · 68 lines · 3878 B
1// nx_connect_honest_framing.nx -- CONNECT capability: honest no-compatibility-score framing (CIQ vision
2// cell; incumbents over-claim "87% compatible!" -- an unfalsifiable pseudo-scientific score that drives
3// dark-pattern engagement). Nishi, BY CONSTRUCTION, never emits an unfalsifiable compatibility/match score;
4// it surfaces only AUDITABLE signals, each backed by a concrete fact (a count or a boolean). MEASURED proof:
5// classify each field of both products' match-output schemas -- the incumbent schema carries >=1
6// unfalsifiable score; Nishi's carries ZERO and >=1 auditable signal. Exceed by construction (honesty is a
7// schema invariant, not a promise). 100% sovereign, integer. license_tier: ORIGINAL expect_exit: 0
8import "nx_syscalls.nx"
9
10func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
11func hn(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 }
12
13func has_sub(hay: *u8, needle: *u8) -> i64 {
14 var i: i64=0
15 while hay[i]!=(0 as u8) {
16 var j: i64=0; var ok: i64=1
17 while needle[j]!=(0 as u8) { if hay[i+j]!=needle[j] { ok=0; j=0; while needle[j]!=(0 as u8){j=j+1} } else { j=j+1 } }
18 if ok==1 { return 1 }
19 i=i+1
20 }
21 return 0
22}
23// a field is UNFALSIFIABLE if its name implies a pseudo-scientific score/percentage.
24func unfalsifiable(field: *u8) -> i64 {
25 if has_sub(field, "compatibility" as *u8) == 1 { return 1 }
26 if has_sub(field, "percent" as *u8) == 1 { return 1 }
27 if has_sub(field, "score" as *u8) == 1 { return 1 }
28 return 0
29}
30
31func count_schema(fields: *i64, n: i64, unf_out: *i64, aud_out: *i64) -> i64 {
32 var unf: i64=0; var aud: i64=0
33 var i: i64=0
34 while i < n { if unfalsifiable(fields[i] as *u8)==1 { unf=unf+1 } else { aud=aud+1 } i=i+1 }
35 unf_out[0]=unf; aud_out[0]=aud
36 return 0
37}
38
39func main() -> i64 {
40 // INCUMBENT match-output schema (Match/eHarmony-style)
41 let inc: *i64 = sys_mmap(8 * 4) as *i64
42 inc[0]="compatibility_score" as *u8 as i64
43 inc[1]="match_percentage" as *u8 as i64
44 inc[2]="distance_km" as *u8 as i64
45 inc[3]="last_active" as *u8 as i64
46 // NISHI match-output schema -- only auditable, fact-backed signals
47 let nis: *i64 = sys_mmap(8 * 4) as *i64
48 nis[0]="shared_interests_count" as *u8 as i64
49 nis[1]="both_replied" as *u8 as i64
50 nis[2]="same_language" as *u8 as i64
51 nis[3]="mutual_intent_lane" as *u8 as i64
52
53 let iu: *i64 = sys_mmap(8) as *i64; let ia: *i64 = sys_mmap(8) as *i64
54 let nu: *i64 = sys_mmap(8) as *i64; let na: *i64 = sys_mmap(8) as *i64
55 count_schema(inc, 4, iu, ia)
56 count_schema(nis, 4, nu, na)
57
58 hw("=== nx_connect_honest_framing -- no unfalsifiable compatibility score, by construction ===\n" as *u8)
59 hw("INCUMBENT schema: unfalsifiable-score fields=" as *u8); hn(iu[0]); hw(" auditable=" as *u8); hn(ia[0]); hw("\n" as *u8)
60 hw("NISHI schema: unfalsifiable-score fields=" as *u8); hn(nu[0]); hw(" auditable=" as *u8); hn(na[0]); hw("\n" as *u8)
61
62 // MEASURED gate: Nishi emits ZERO unfalsifiable scores + >=1 auditable signal; incumbent emits >=1 score.
63 var ok: i64 = 0
64 if nu[0] == 0 { if na[0] >= 1 { if iu[0] >= 1 { ok = 1 } } }
65 hw("--- gate --- nishi zero pseudo-scores & has auditable signals & incumbent over-claims: " as *u8); if ok==1 { hw("PASS" as *u8) } else { hw("FAIL" as *u8) } hw("\n" as *u8)
66 if ok == 1 { hw("HONESTFRAMINGGATE verdict=GREEN (Nishi never fakes a compatibility %; honesty is a schema invariant; exceed by construction)\n" as *u8); sys_exit(0); return 0 }
67 hw("HONESTFRAMINGGATE verdict=RED\n" as *u8); sys_exit(1); return 1
68}