code wiki / _hdl_build / nx_callui_census.nx
nx_callui_census.nx source
↩ module page · 77 lines · 5114 B
1// nx_callui_census.nx -- MEASURED census of the /video room UI vs the SOTA call-UI mechanic set
2// (Jitsi/Zoom/Meet/FaceTime, banked by nx_callui_research_fetch). Grades the SHIPPED client files
3// (index.html + app.v2.js) by MECHANICAL EVIDENCE (capability markers in the served source), one row per
4// SOTA mechanic, HAVE/GAP + permille. HONEST SCOPE (printed): file-evidence = "the capability exists in
5// the client", NOT a UX-quality measurement (that is the user-sim/OCR class, a later rung). NEG-CONTROL:
6// a row probed with a marker that cannot exist MUST grade GAP -- proves the checker never gifts a HAVE.
7// expect_exit: 0 = census sound (neg-control fired); the SCORE prints honestly either way. ORIGINAL
8import "nx_syscalls.nx"
9
10func cw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
11func cn(v: i64) -> i64 {
12 let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m}
13 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}
14 var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
15func has(hay: *u8, n: i64, needle: *u8) -> i64 {
16 var nl: i64=0; while needle[nl]!=(0 as u8){nl=nl+1}
17 var i: i64=0
18 while i+nl<=n { var j: i64=0; var ok: i64=1; while j<nl { if hay[i+j]!=needle[j]{ok=0;j=nl} else {j=j+1} } if ok==1{return 1} i=i+1 }
19 return 0 }
20
21func row(name: *u8, present: i64, tally: *i64) -> i64 {
22 cw(" " as *u8); cw(name)
23 if present == 1 { cw(" HAVE\n" as *u8); tally[0] = tally[0] + 1 } else { cw(" GAP\n" as *u8) }
24 tally[1] = tally[1] + 1
25 return 0
26}
27
28func main() -> i64 {
29 cw("=== nx_callui_census: /video room UI vs SOTA call-UI mechanics (file-evidence, liar-killed) ===\n" as *u8)
30 let hbox: *i64 = sys_mmap(16) as *i64
31 let html: *u8 = sys_read_file("sites/nishifamily/video/index.html" as *u8, hbox)
32 if (html as i64)==0 { cw("no index.html\n" as *u8); return 1 }
33 let hn: i64 = hbox[0]
34 let jbox: *i64 = sys_mmap(16) as *i64
35 let js: *u8 = sys_read_file("sites/nishifamily/video/app.v2.js" as *u8, jbox)
36 if (js as i64)==0 { cw("no app.v2.js\n" as *u8); return 1 }
37 let jn: i64 = jbox[0]
38 let t: *i64 = sys_mmap(32) as *i64
39 t[0]=0; t[1]=0
40
41 cw(" JOIN FLOW:\n" as *u8)
42 row("green-room pre-join (self-preview + device check before entering)" as *u8, has(js, jn, "greenroom" as *u8), t)
43 row("device pickers (enumerateDevices camera/mic selection)" as *u8, has(js, jn, "enumerateDevices" as *u8), t)
44 row("named join + invite link" as *u8, has(html, hn, "inviteBtn" as *u8), t)
45 cw(" SEEING EACH OTHER:\n" as *u8)
46 row("active-speaker detection (audio level -> tile highlight)" as *u8, has(js, jn, "speaking" as *u8), t)
47 row("2-person layout: remote FULL-SCREEN + self PiP corner (the #1 call framing)" as *u8, has(js, jn, "callLayout" as *u8), t)
48 row("self-view MIRRORED (every SOTA call app mirrors self)" as *u8, has(html, hn, "scaleX(-1)" as *u8), t)
49 row("per-tile mute/cam-off badges (see WHO is muted)" as *u8, has(js, jn, "muteBadge" as *u8), t)
50 row("per-tile connection-quality indicator" as *u8, has(js, jn, "tileQuality" as *u8), t)
51 row("aspect-correct responsive tile grid" as *u8, has(html, hn, "aspect-ratio" as *u8), t)
52 cw(" CONTROLS:\n" as *u8)
53 row("control bar (mute/cam/share/leave)" as *u8, has(html, hn, "shareBtn" as *u8), t)
54 row("keyboard shortcuts (m=mute, v=video)" as *u8, has(js, jn, "keydown" as *u8), t)
55 row("screen-share as DISTINCT surface (not self-replacement)" as *u8, has(js, jn, "shareTile" as *u8), t)
56 cw(" RESILIENCE + POLISH:\n" as *u8)
57 row("reconnect UX (visible state, auto-rejoin)" as *u8, has(js, jn, "reconnecting" as *u8), t)
58 row("mobile safe-area (env(safe-area-inset))" as *u8, has(html, hn, "safe-area-inset" as *u8), t)
59 row("accessibility (aria- labels on controls)" as *u8, has(html, hn, "aria-" as *u8), t)
60 row("in-call text chat" as *u8, has(html, hn, "chatlog" as *u8), t)
61 row("async video messages (circles)" as *u8, has(html, hn, "circlesBtn" as *u8), t)
62
63 // NEG-CONTROL: a marker that cannot exist must grade GAP
64 let negt: *i64 = sys_mmap(32) as *i64
65 negt[0]=0; negt[1]=0
66 row("NEG-CONTROL (impossible marker; MUST be GAP)" as *u8, has(js, jn, "zz_impossible_marker_9x7q" as *u8), negt)
67 var neg_ok: i64 = 0
68 if negt[0] == 0 { neg_ok = 1 }
69
70 let permille: i64 = t[0] * 1000 / t[1]
71 cw(" SCORE: " as *u8); cn(t[0]); cw("/" as *u8); cn(t[1]); cw(" = " as *u8); cn(permille); cw(" permille of the SOTA mechanic set\n" as *u8)
72 cw(" HONEST SCOPE: file-evidence census (capability present in the shipped client), not UX-quality\n" as *u8)
73 cw(" measurement; the user-sim/OCR instrument class grades LOOK/feel (a later rung, like the browser arc).\n" as *u8)
74 if neg_ok == 1 { cw("CALLUI-CENSUS verdict=SOUND (neg-control fired; the GAP list above is the build queue)\n" as *u8); return 0 }
75 cw("CALLUI-CENSUS verdict=UNSOUND -- neg-control graded HAVE (checker gifts capabilities)\n" as *u8)
76 return 1
77}