fix(desktop): adapt to delayed media and preserve active references - #65
Merged
Merged
Conversation
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.
Reliable-relay desktop video could discard reference chains and repeatedly request large IDRs. Completed successors now wait for bounded active readers; missing stream arrival gets an RTT-based100–1000ms window. Managed heartbeat RTT uses bounded local send/echo correlations because caller timestamps survive desktop reconnect and cannot be subtracted from a fresh session clock.
The sender adapts to delayed/failed media receipts independently of packet loss, holds recovery five seconds and grows only with fresh ACKs. Correlated media penalties coalesce over one second and overlapping path/media reductions combine once. Independent production/delivery health distinguishes native work, codec skips and admission/ACK waits during stopped video. Logs contain metadata only.
No wire, identity, authorization or dependency change. Existing read/ACK deadlines, global resource budgets and reference-preserving encoder updates remain intact.
Validation: current whole all-feature workspace Mac779/0/2ignored and Linux781/0/11ignored,107 result groups each; strict all-feature/all-target clippy and formatting both. Real Iroh/Noq reference/tag and caller-clock regressions fail before and pass after. The isolated real UDP delay fixture fails with path-only adaptation and passes with media feedback; controller tests cover burst coalescing, sustained pressure, recovery hold and bounds. Prior Linux transient relay-closure failure and successful unchanged focused/full rerun are retained. Cargo-deny passes; no dependency changed.
Both devices run the corrected production code with preserved binary backups. FullHD native pixels,24 attributed input/color changes, exact Unicode47/136000-byte pastes and same-window server recovery are verified. New corrected-pair paste matches; server restart recovered in4530ms. Prior longer sessions failed freshness acceptance despite sometimes zero reconnects. A fresh visible motion/mixed-workload qualification is running; this increment does not claim broad milestone or physical glass-to-glass latency acceptance.