The transmission plane stops decaying to a blast #401

Merged
enricobuehler merged 1 commits from worktree-abr-transmission-plane into main 2026-08-26 18:14:33 +00:00
Owner

ABR overhaul Phase 1 (planning PR #20, RFC §2.1–2.4 — signed off): the motion-onset field case's transmission-plane half. Static content used to strip both defenses — the microburst allowance was gigabit-sized so Wi-Fi frames never paced at all, and adaptive FEC decayed to 1 % — and the first motion frame died unprotected.

Pacing (§2.1–2.3):

  • The unpaced allowance becomes time at the pace rateclamp(pace_rate × 10 ms, 16 KiB, 256 KiB) (send_pacing::auto_burst_bytes, pure + unit-tested). One constant lines up both proven ends: ~19 KiB at the field case's 15 Mbps pace (its discriminator was PACE_BURST_KB=16) and ~112 KiB at 90 Mbps LAN pace ≈ the old 128 KiB floor, so LAN latency does not regress. PUNKTFUNK_PACE_FACTOR=0 keeps the legacy fraction-of-frame rule; PUNKTFUNK_PACE_BURST_KB still pins.
  • A streamed AU consumes one allowance across its block flushes (StreamedOpen.burst_left) instead of a fresh 128 KiB per block — the latent multiplication the handoff flagged.
  • One frame's paced spread is bounded to ~2 frame intervals (live refresh off stats.mode) so a paced IDR can't back the encode|send sync_channel(3) up into cadence_degraded, which refuses every climb. MAX_PACE_SPREAD stays the absolute ceiling — a 5 fps virtual mode re-licenses nothing.

FEC (§2.4):

  • The adaptive decay gains a burned floor (FecFloor, pure + unit-tested): any window reporting real shard loss raises the floor to 5 %; ~2 clean minutes re-earn 1 %; a re-burn inside the step-down's probation doubles the requirement (bounded ~16 min); a step-down that survives resets it. No session-permanent latch — the encode stand-down's house rule. PUNKTFUNK_FEC_PCT pin semantics and the GameStream plane are untouched.

Docs: the FEC_PCT row now mentions the burned band.

Verified: cargo fmt --check clean; the pure logic (FecFloor, auto_burst_bytes, native_budget old+new assertions) proven green natively via the verbatim-copy harness. The workspace compile + tests lean on ci / rust — local Docker was occupied by a parallel job's build (the OOM-each-other trap). Field validation (the A/B static→motion rig) is tracked in the RFC's Phase 0 opens.

ABR overhaul **Phase 1** (planning PR #20, RFC §2.1–2.4 — signed off): the motion-onset field case's transmission-plane half. Static content used to strip both defenses — the microburst allowance was gigabit-sized so Wi-Fi frames never paced at all, and adaptive FEC decayed to 1 % — and the first motion frame died unprotected. **Pacing (§2.1–2.3):** - The unpaced allowance becomes **time at the pace rate** — `clamp(pace_rate × 10 ms, 16 KiB, 256 KiB)` (`send_pacing::auto_burst_bytes`, pure + unit-tested). One constant lines up both proven ends: ~19 KiB at the field case's 15 Mbps pace (its discriminator was `PACE_BURST_KB=16`) and ~112 KiB at 90 Mbps LAN pace ≈ the old 128 KiB floor, so LAN latency does not regress. `PUNKTFUNK_PACE_FACTOR=0` keeps the legacy fraction-of-frame rule; `PUNKTFUNK_PACE_BURST_KB` still pins. - A **streamed AU consumes one allowance across its block flushes** (`StreamedOpen.burst_left`) instead of a fresh 128 KiB per block — the latent multiplication the handoff flagged. - One frame's paced spread is **bounded to ~2 frame intervals** (live refresh off `stats.mode`) so a paced IDR can't back the encode|send `sync_channel(3)` up into `cadence_degraded`, which refuses every climb. `MAX_PACE_SPREAD` stays the absolute ceiling — a 5 fps virtual mode re-licenses nothing. **FEC (§2.4):** - The adaptive decay gains a **burned floor** (`FecFloor`, pure + unit-tested): any window reporting real shard loss raises the floor to 5 %; ~2 clean minutes re-earn 1 %; a re-burn inside the step-down's probation doubles the requirement (bounded ~16 min); a step-down that survives resets it. No session-permanent latch — the encode stand-down's house rule. `PUNKTFUNK_FEC_PCT` pin semantics and the GameStream plane are untouched. Docs: the `FEC_PCT` row now mentions the burned band. **Verified:** `cargo fmt --check` clean; the pure logic (FecFloor, auto_burst_bytes, native_budget old+new assertions) proven green natively via the verbatim-copy harness. The workspace compile + tests lean on `ci / rust` — local Docker was occupied by a parallel job's build (the OOM-each-other trap). Field validation (the A/B static→motion rig) is tracked in the RFC's Phase 0 opens.
enricobuehler added 1 commit 2026-08-26 16:58:57 +00:00
The transmission plane stops decaying to a blast (ABR overhaul Phase 1)
ci / bun-nix (pull_request) Successful in 23s
ci / docs-drift (pull_request) Successful in 28s
ci / docs-site (pull_request) Successful in 1m11s
ci / rust-arm64 (pull_request) Successful in 1m30s
ci / web (pull_request) Successful in 1m42s
ci / rust (pull_request) Successful in 6m18s
android / android (pull_request) Successful in 6m32s
9c278ee351
Static content used to strip every defense before motion: the unpaced
microburst allowance was an absolute max(128 KiB, wire/4) — sized for
gigabit LAN, so at Wi-Fi bitrates every frame went out back-to-back —
and adaptive FEC decayed to 1 %, so the first big motion frame died
unprotected (the 2026-08-26 field case; RFC design/abr-stack-overhaul.md
in punktfunk-planning, §2.1–2.4).

- The allowance is now TIME at the pace rate: 10 ms, clamped to
  [16 KiB, 256 KiB] (send_pacing::auto_burst_bytes). One constant lines
  up both proven ends — ~19 KiB at the field case's 15 Mbps pace (its
  discriminator was PACE_BURST_KB=16) and ~112 KiB at 90 Mbps LAN pace,
  so LAN latency does not regress. PACE_FACTOR=0 keeps the legacy rule.
- A streamed AU consumes ONE allowance across its block flushes instead
  of a fresh one per block (the latent per-block multiplication).
- One frame's paced spread is bounded to ~2 frame intervals so an IDR
  can't back the encode|send sync_channel(3) up into cadence_degraded,
  which refuses every climb; MAX_PACE_SPREAD stays the absolute bound.
- Adaptive FEC gains a burned floor: any window with real shard loss
  raises the decay floor to 5 %; ~2 clean minutes re-earn 1 %, an early
  re-burn doubles the requirement (bounded), a durable step-down resets
  it — no session-permanent latch, per the encode stand-down's house
  rule. PUNKTFUNK_FEC_PCT pin semantics and the GameStream plane are
  untouched.

Pure logic (FecFloor, auto_burst_bytes, native_budget) is unit-tested;
the burned-floor band is noted in the FEC_PCT docs.
enricobuehler merged commit 8ca86b1682 into main 2026-08-26 18:14:32 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#401