fix(pipeline): idle poll flood, data streak breaks, tuning#1309
Merged
therealaleph merged 5 commits intoMay 19, 2026
Merged
Conversation
7952f6a to
d5f262a
Compare
cb9f42d to
dd56f9c
Compare
- INFLIGHT_OPTIMIST 2→1: reduce initial pipeline depth - MAX_ELEVATED_PER_DEPLOYMENT 30→2: tighten elevation cap - block_stun default true→false: allow STUN/TURN by default Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- MAX_ELEVATED_PER_DEPLOYMENT → MAX_ELEVATED_TOTAL = 10: flat cap across all deployments instead of multiplied per script - INFLIGHT_ACTIVE 4→2: lower max pipeline depth Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three root-cause fixes for the v1.9.28+ pipelining regression where request count explodes and Instagram videos fail to load: 1. Escalating keepalive backoff (20ms→80ms→200ms→500ms→2s) when the pipeline drains to zero in-flight and consecutive empties grow. The pre-pipelining serial loop had this; the new loop sent polls with zero delay, flooding idle sessions. 2. Suppress refill timer at IDLE depth with consecutive empties — the keepalive path with backoff handles that; the refill timer was scheduling new polls every 1s regardless. 3. Stale empty-poll replies no longer break active data streaks. A poll queued before data started flowing returns empty as expected; now it won't increment consecutive_empty or reset consecutive_data during a streak — fixing premature depth drops that killed video streaming throughput. 4. Reduce can_read overflow from +4 to +1 extra in-flight slot to stop upload reads from inflating request count beyond the pipeline depth budget. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dd56f9c to
e1014ef
Compare
therealaleph
approved these changes
May 19, 2026
Owner
therealaleph
left a comment
There was a problem hiding this comment.
Verified locally on current head e1014ef57ff5ab58046c15435afde5f2dc54ede0.
Passed:
cargo test --libcargo build --releasecargo build --bin mhrv-rs-ui --release --features uiJAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ANDROID_HOME="$HOME/Library/Android/sdk" ./gradlew :app:assembleDebug
Approved for merge.
Answered via LLM, Supervised @therealaleph
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the v1.9.28+ pipelining regression where the request counter rapidly increases, Instagram videos fail to load, and 15 deployments is slower than 6 with the old code.
Tuning changes
true→false: STUN/TURN traffic allowed by defaultPipeline regression fixes
Root cause
The old serial loop (pre-v1.9.28) sent one request at a time with escalating backoff (20ms→80ms→200ms→500ms→30s). Idle sessions cost essentially zero requests. The new pipelined loop had no backoff on empty keepalive polls and kept the refill timer firing every 1s at all depths, generating continuous empty requests across all sessions. With 15 deployments × many sessions × no backoff = quota exhaustion.
Test plan
🤖 Generated with Claude Code