code wiki / _hdl_build / nx_room_waitlobby.nx
nx_room_waitlobby.nx
buildroot/runtime/_hdl_build/nx_room_waitlobby.nx
about
nx_room_waitlobby.nx -- X-ROOM (GEN-ROOM-waiting-room-lobby): sovereign
DETERMINISTIC admission-control FSM for the room's PRO-mode waiting room
(lobby). Participants KNOCK; the host ADMITs / DENYs / ADMIT_ALLs; the room
can be LOCKed (closed). Every transition is a reproducible, auditable verdict.
EXCEED axis (honest) vs Zoom/Whereby waiting rooms: deterministic + audit-
replayable admission -- replay the same event stream, get the same admitted set
-- plus two integrity invariants a loose implementation can violate:
(I1) a host can only ADMIT/DENY someone who actually KNOCKED (no admitting a
ghost id = no silent gate-crash),
(I2) a KNOCK while the room is LOCKED is closed-out (DENIED) deterministically,
not racily admitted.
Pro waiting-room (explicit admit) is the DATA-distinct sibling of personal
instant-join; this organ is the explicit-admit half.
status codes: 0=UNKNOWN 1=KNOCKING 2=ADMITTED 3=DENIED ; status[0] = locked flag.
event codes: 1=KNOCK 2=ADMIT 3=DENY 4=ADMIT_ALL 5=LOCK 6=UNLOCK.
main() is the SELF-VALIDATING GATE. Evidence -> knowledge/status/room_waitlobby.log.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 23 | const WL_LOG: *u8 = "knowledge/status/room_waitlobby.log" |
| 24 | const WL_UNKNOWN: i64 = 0 |
| 25 | const WL_KNOCKING: i64 = 1 |
| 26 | const WL_ADMITTED: i64 = 2 |
| 27 | const WL_DENIED: i64 = 3 |
functions
| 29 | func ww(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 } |
| 30 | func wwn(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;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 } |
| 34 | func wl_run(maxid: i64, evt: *i64, eid: *i64, nev: i64, status: *i64) -> i64 called by 1: main |
| 62 | func wl_count(maxid: i64, status: *i64, want: i64) -> i64 called by 1: main |
| 69 | func main() -> i64 |