code wiki / _hdl_build / nx_room_resilience.nx

nx_room_resilience.nx

buildroot/runtime/_hdl_build/nx_room_resilience.nx

13111 B222 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic room
docsdependenciesstructsconstsfunctions

about

nx_room_resilience.nx -- MEASURED head-to-head: sovereign proactive FEC vs the incumbent ARQ/NACK-retransmit recovery model (WebRTC/Zoom/Teams video default), on an intercontinental link. Converts the room census's "loss-resilience = BEHIND/unclaimed (no incumbent baseline)" into a MEASURED, caveated exceed. THE MECHANISM (textbook, RFC-grounded -- not a wave): ARQ: a lost packet is re-requested (NACK) -> the retransmit arrives +1 RTT later. On a high-RTT intercontinental link (~250ms RTT) that retransmit usually arrives AFTER the playout/jitter deadline -> the frame FREEZES. FEC: k data + m parity ship together; ANY <=m losses in the n=k+m block are reconstructed from parity ALREADY IN FLIGHT -> 0 added latency, no retransmit, on-time. RTT-INDEPENDENT by construction. We REUSE the proven RS GF(256) erasure codec from nx_room_fec.nx (no reimpl, DRY) and ACTUALLY encode/decode every block under the loss trace -> the on-time count is backed by byte-exact reconstruction, not arithmetic. HONEST DISCIPLINE (no-wave): one fixed loss trace, vary ONLY RTT across LAN/moderate/ intercontinental so the win is attributable to RTT, not a constant. Negative controls: (T3) at LAN RTT, ARQ's cheap retransmit recovers EVERYTHING -> it TIES OR BEATS FEC (FEC loses the rare >m-burst block) -> the exceed is regime-specific, not rigged. (T4) a >m-loss block -> FEC frozen>0 (honest recovery bound, not a fake 100%). (T5) corrupt the generator matrix -> recovery breaks -> parity is load-bearing. SCOPE CAVEAT (printed): this is vs the ARQ-retransmit model. vs WebRTC's OPTIONAL FlexFEC the mechanism is parity-of-kind; our exceed THERE is the provable MDS guarantee (every <=m pattern, audit-replayable, byte-exact) + full sovereignty -- not a lower loss number, and NOT yet a live WebRTC packet capture. main() is the SELF-VALIDATING GATE. Evidence -> knowledge/status/room_resilience.log. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_room_fec.nx nx_room_resilience.nx

imports: nx_syscalls.nxnx_room_fec.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap gf_init fec_build_G gf_inv make_trace sys_mmap ↻ lcg_next count_data_losses sim_fec_real fec_encode gf_mul fec_decode sys_mmap ↻ gf_solve gf_inv ↻ gf_mul ↻ fec_data_eq sim_arq fw sys_write fwn sys_mmap ↻ sys_write ↻ sys_openat_append sys_close sys_exit

structs

none

consts

32const RESIL_MAGIC_1103515245: i64 = 1103515245
33const RESIL_MAGIC_12345: i64 = 12345
34const RESIL_MAGIC_1600: i64 = 1600
35const RESIL_MAGIC_880301: i64 = 880301
37const RESIL_LOG: *u8 = "knowledge/status/room_resilience.log"

functions

39func fw(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 }
called by 1: main calls 1: sys_write
40func fwn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
52func lcg_next(s: *i64) -> i64 { s[0] = (s[0] * RESIL_MAGIC_1103515245 + RESIL_MAGIC_12345) & 0x7fffffffffffffff; return (s[0] >> 16) & 0x7fff }
called by 1: make_trace
55func make_trace(lost: *i64, slots: i64, loss_pct: i64, seed: i64) -> i64
called by 1: main calls 2: sys_mmaplcg_next
63func count_data_losses(lost: *i64, B: i64, k: i64, n: i64) -> i64
called by 1: main
71func sim_fec_real(exp: *i64, log: *i64, G: *i64, lost: *i64, B: i64, k: i64, m: i64, S: i64,
101func sim_arq(lost: *i64, B: i64, k: i64, n: i64, rtt: i64, jitter: i64, res: *i64) -> i64
called by 1: main
118func main() -> i64