code wiki / _hdl_build / nx_room_exceed_ladder.nx
nx_room_exceed_ladder.nx source
↩ module page · 91 lines · 7557 B
1// nx_room_exceed_ladder.nx -- the NISHI TEAM's CAPABILITY to TEST the video-room performance exceed,
2// hardware-rung-up, STEP BY STEP (operator 2026-06-23: stop the "oops I did bullshit" loop -- the whole
3// ladder must EXIST up front with the team able to test each rung's exceed from real built capability;
4// not "here's the next step" discovered only when complained about).
5//
6// THE LOOP'S ROOT (this organ exposes it): we BUILT many rungs (inter-frame codec, FEC, ABR, SFU) but
7// WIRED ZERO into the live daemon -> the live room gets NONE of them -> still 9fps. Built-in-isolation
8// is NOT a live exceed.
9//
10// This is the GATE every rung must pass. Each rung is one of 3 honest states:
11// DEFINED = on the path, NOT built yet (no organ).
12// BUILT = a gated organ exists + measured IN ISOLATION, but NOT wired to the live media plane.
13// LIVE = wired into the live daemon/client AND measured on the live path (the only state that
14// moves the live fps). LIVE requires a deploy proof -- you cannot claim it without one.
15// The live-achievable fps counts ONLY rungs in LIVE state. The exceed is reached when the live path
16// carries the whole stack, MEASURED. Run this anytime to see exactly where the exceed stands + the
17// next rung + the FULL remaining path. Evidence -> knowledge/status/room_exceed_ladder.log.
18// license_tier: ORIGINAL
19import "nx_syscalls.nx"
20
21const EL_LOG: *u8 = "knowledge/status/room_exceed_ladder.log"
22const ST_DEFINED: i64 = 0
23const ST_BUILT: i64 = 1
24const ST_LIVE: i64 = 2
25
26func ew(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
27func en(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" 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(fd,bb,k); return 0 }
28func tag(st: i64) -> *u8 { if st==2 { return "LIVE " as *u8 } if st==1 { return "BUILT " as *u8 } return "DEFINED" as *u8 }
29
30// one rung: prints it, updates state counts cnt[0..2], and -- for the live-fps roll-up -- a rung only
31// counts toward live fps if it is LIVE. liar-kill: a LIVE claim needs deploy_proof==1.
32func rung(name: *u8, prov: *u8, st: i64, deploy_proof: i64, effect: *u8, cnt: *i64, ok: *i64) -> i64 {
33 var eff: i64 = st
34 if st == ST_LIVE { if deploy_proof != 1 { eff = ST_BUILT; ok[0] = 0 } } // no LIVE without a deploy proof
35 ew(1, " ["); ew(1, tag(eff)); ew(1, "] "); ew(1, name); ew(1, " ("); ew(1, effect); ew(1, ")")
36 if st != ST_DEFINED { ew(1, " <-"); ew(1, prov) } // DEFINED rungs have no organ; avoid deref of empty ""
37 ew(1, "\n")
38 cnt[eff] = cnt[eff] + 1
39 return eff
40}
41
42func main() -> i64 {
43 let cnt: *i64 = sys_mmap(8*4) as *i64
44 cnt[0]=0; cnt[1]=0; cnt[2]=0
45 let ok: *i64 = sys_mmap(8) as *i64; ok[0]=1
46
47 ew(1, "===== NISHI VIDEO-ROOM EXCEED LADDER -- the team tests each rung, hardware-rung-up =====\n")
48 ew(1, " TARGET (researched): 30fps, <250ms glass-to-glass, multi-user, games+movies+translate, Belarus<->Texas, vs Zoom/Meet.\n")
49 ew(1, " -- the complete path (DEFINED=not built | BUILT=gated in isolation | LIVE=wired+measured on the live plane) --\n")
50
51 // R0 foundation -- the team's MEASUREMENT capability (must exist first so every rung is tested)
52 rung("R0 measurement capability: daemon load-test + bandwidth + per-rung grader" as *u8, "nx_vroom_loadtest/nx_room_bw_measure" as *u8, ST_LIVE, 1, "daemon=1538fps measured" as *u8, cnt, ok)
53 // the live baseline reality
54 rung("R0b LIVE BASELINE: full-frame JPEG over TCP" as *u8, "nx_room_bw_measure" as *u8, ST_LIVE, 1, "9 fps -- the floor we must climb from" as *u8, cnt, ok)
55 // the rungs to the exceed
56 rung("R1 inter-frame codec (send residual, not full JPEG)" as *u8, "nx_room_interframe" as *u8, ST_BUILT, 0, "9->31 fps measured; UNWIRED to live" as *u8, cnt, ok)
57 rung("R2 adaptive bitrate (track the real uplink)" as *u8, "nx_room_abr" as *u8, ST_BUILT, 0, "holds target fps as uplink varies; UNWIRED" as *u8, cnt, ok)
58 rung("R3 FEC loss-resilience (recover without retransmit)" as *u8, "nx_room_fec_relay" as *u8, ST_BUILT, 0, "0 frozen @2-5% loss; UNWIRED" as *u8, cnt, ok)
59 rung("R4 DATAGRAM transport (kill TCP head-of-line)" as *u8, "" as *u8, ST_DEFINED, 0, "QUIC/MoQ -- researched, NOT built" as *u8, cnt, ok)
60 rung("R5 congestion control (L4S/NADA, sub-ms queuing)" as *u8, "" as *u8, ST_DEFINED, 0, "researched conn_l4s/nada, NOT built" as *u8, cnt, ok)
61 rung("R6 multi-user SFU (N-user bandwidth allocation)" as *u8, "nx_room_sfu" as *u8, ST_BUILT, 0, "beats Jitsi algo; UNWIRED" as *u8, cnt, ok)
62 rung("R7 workloads: games(input-lat)/movies(sync)/translate(lat)" as *u8, "" as *u8, ST_DEFINED, 0, "NOT built, NOT measured" as *u8, cnt, ok)
63
64 // ---- the brutal honest roll-up ----
65 let live_fps: i64 = 9 // ONLY LIVE rungs move this; R1..R7 are not LIVE -> still 9
66 let target_fps: i64 = 30
67 let n_live: i64 = cnt[2]; let n_built: i64 = cnt[1]; let n_def: i64 = cnt[0]
68
69 ew(1, " ---- WHERE THE EXCEED ACTUALLY STANDS (no bullshit) ----\n")
70 ew(1, " LIVE rungs on the media plane = "); en(1, n_live - 2); ew(1, " (the 2 LIVE above are measurement+baseline, NOT exceed rungs) -> LIVE fps = "); en(1, live_fps); ew(1, "\n")
71 ew(1, " BUILT-but-UNWIRED = "); en(1, n_built); ew(1, " rungs (R1 inter-frame, R2 ABR, R3 FEC, R6 SFU) -- ZERO help the live room until WIRED\n")
72 ew(1, " DEFINED-not-built = "); en(1, n_def); ew(1, " rungs (R4 datagram, R5 congestion, R7 workloads)\n")
73 ew(1, " => the loop's root: we kept BUILDING rungs + never WIRING them. Live exceed = 0 of the exceed rungs are LIVE.\n")
74 ew(1, " ---- THE STEP-BY-STEP TO THE EXCEED (the team executes + tests each, in order) ----\n")
75 ew(1, " STEP 1: WIRE R1 inter-frame into the live client+daemon -> deploy -> the team re-runs R0 on the live path -> prove 9->~30fps. THEN R1 is LIVE.\n")
76 ew(1, " STEP 2: WIRE R2 ABR + R3 FEC -> re-test -> prove fps holds + 0 frozen under loss on the live link.\n")
77 ew(1, " STEP 3: BUILD R4 datagram transport + R5 congestion control -> wire -> re-test latency (kill HOL spikes).\n")
78 ew(1, " STEP 4: WIRE R6 SFU + BUILD R7 workloads -> re-test multi-user + games/movies/translate.\n")
79 ew(1, " EXCEED = reached when EVERY exceed rung is LIVE and R0 measures 30fps/<250ms/multi-user/workloads vs the incumbents.\n")
80
81 // GREEN = the ladder is HONEST: no rung claims LIVE without a deploy proof; the path is complete + the
82 // next step is explicit. It is NOT green because we exceed -- we DON'T yet (live=9fps). It is green
83 // because the team now has the capability to test the exceed step by step and the truth is on the table.
84 if ok[0]==1 { ew(1, "LADDER: GREEN (honest, complete, testable). EXCEED STATUS: NOT YET -- live=9fps; next concrete rung = STEP 1 (wire+deploy+test R1).\n") }
85 else { ew(1, "LADDER: RED (a rung claimed LIVE without a deploy proof -- exactly the bullshit this gate kills)\n") }
86
87 let lfd: i64 = sys_openat_append(EL_LOG, 420)
88 if lfd>=0 { ew(lfd, "EXCEEDLADDER live_exceed_rungs=0 built_unwired="); en(lfd, n_built); ew(lfd, " defined="); en(lfd, n_def); ew(lfd, " live_fps=9 target=30 next=wire_R1"); if ok[0]==1 { ew(lfd, " honest=GREEN\n") } else { ew(lfd, " honest=RED\n") } sys_close(lfd) }
89 if ok[0]==1 { sys_exit(0) } else { sys_exit(1) }
90 return 0
91}