Rumble envelopes (0xCA v2) + 0.9.2 #3
Reference in New Issue
Block a user
Delete Branch "rumble-envelopes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cuts 0.9.2. Makes "stuck rumble" inexpressible on the wire by moving rumble from level-triggered unbounded state to host-authoritative self-terminating envelopes, and folds in two pre-existing working-tree fixes.
Rumble envelopes (0xCA v2)
The 0xCA datagram grows a length-tolerant tail
[u8 seq][u16 ttl_ms]: the host authorizes a level for at mostttl_msand renews it (~120 ms) while it holds, letting an abandoned one lapse client-side.seqis a per-pad wrapping reorder gate (reusingGamepadSnapshot::seq_newer). Decoders read the first 7 bytes as a plain level and ignore the tail, so no wire-version bump — all four host/client generation pairings render correctly. Per-client staleness magic (SDL 1.5 s, Apple 1.6 s, Android 60 s) is demoted to a legacy-host-only fallback.encode_rumble_datagram_v2/decode_rumble_envelope; demux seq gate →(pad, low, high, Option<ttl>);next_rumbleunchanged,next_rumble_ttladded; ABIpunktfunk_connection_next_rumble2+PUNKTFUNK_RUMBLE_NO_TTL,ABI_VERSION4→5 (WIRE_VERSION unchanged).PUNKTFUNK_RUMBLE_ENVELOPE=0,PUNKTFUNK_RUMBLE_TTL_MS(clamped[150, 5000]).ttl=None: pf-client-core (Deck keep-alive now deadline-bounded), windows (SDL duration), android (JNI packs the lease out-of-band in bit 48), apple (RumbleRenderer.envelopeDeadline+nextRumble2).PUNKTFUNK_TEST_FEEDBACK; Apple loopback assertsttlMsround-trips E2E;RumbleTuninglease cases.Also folded in (pre-existing working-tree fixes)
fix(host/windows): stop a stale rumble residual a game abandoned (the game-facing companion to envelopes).fix(flatpak): bind gamescope's Wayland socket so Deck Game-Mode HDR negotiates HDR10.Design:
punktfunk-planning/design/rumble-envelope-plan.md. Implementation reviewed by an adversarial multi-agent pass; the two confirmed findings (Android sentinel collision, probe assert-vs-log) are fixed in this branch.🤖 Generated with Claude Code