nx_transport_policy.nx
buildroot/runtime/nx_transport_policy.nx
about
nx_transport_policy.nx -- TIERED TRANSPORT policy for the comms stack (lib, no main).
Operator 2026-07-02: "the most s class exceed june 2026 capability with the worse ones as skilled
fallbacks in case of issues and flagging of the failure on the top of the line so they can auto heal."
THE LADDER (best first; each lower tier is a proven, skilled fallback -- rule 14 graceful degradation):
TIER 1 QUIC/WebTransport datagrams + core RS-FEC + L4S-aware (June-2026 frontier; needs the
sovereign HTTP/3+QUIC server -- the registered frontier build)
TIER 2 multi-socket striped WSS + core RS-FEC (k=8,m=2 across legs; one leg's TCP stall becomes
a recoverable erasure -- the measured intl-h2h win, buildable now)
TIER 3 single WSS/TCP (today's LIVE path -- proven, survives everything, worst intl behavior)
CONTRACT (what the client core + daemon both follow):
- always run the HIGHEST tier the measured capabilities allow (tp_best)
- a tier must fail CONSECUTIVELY (threshold, default 3) before falling back -- skilled, not flappy
- EVERY transition (fail-down or heal-up) EMITS A FLAG LINE (tp_flag) -> the status log the
keep-up/heal loop consumes; a silent fallback is a doctrine violation the gate kills
- fallback is never final: tp_should_retry_upgrade opens a heal window (exponential backoff,
30s..600s cap) to probe the higher tier again -- the AUTO-HEAL path back to top-of-line
license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_transport_policy_gate.nx
structs
| none |
consts
| 22 | const TP_TIER_TOP: i64 = 1 |
| 23 | const TP_TIER_STRIPED: i64 = 2 |
| 24 | const TP_TIER_SINGLE: i64 = 3 |
| 25 | const TP_FAIL_THRESHOLD: i64 = 3 |
| 26 | const TP_BACKOFF_MIN_S: i64 = 30 |
| 27 | const TP_BACKOFF_CAP_S: i64 = 600 |
functions
| 30 | func tp_best(caps: i64) -> i64 called by 1: main |
| 39 | func tp_on_failure(tier: i64, now_s: i64, st: *i64) -> i64 called by 1: main |
| 51 | func tp_on_success(st: *i64) -> i64 { st[0] = 0; return 0 } called by 1: main |
| 54 | func tp_should_retry_upgrade(tier: i64, now_s: i64, st: *i64) -> i64 called by 1: main |
| 62 | func tp_on_upgrade(tier: i64, st: *i64) -> i64 called by 1: main |
| 70 | func tp_apps(b: *u8, n: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){b[n+i]=s[i];i=i+1} return n+i } called by 1: tp_flag |
| 71 | func tp_appn(b: *u8, n: i64, v: i64) -> i64 |
| 77 | func tp_flag(buf: *u8, now_s: i64, from_tier: i64, to_tier: i64, event: i64) -> i64 |
| 94 | func tp_flag_emit(now_s: i64, from_tier: i64, to_tier: i64, event: i64) -> i64 |