Repository navigation
perf(desktop): coalesce control admission and observe viewer transmit stalls - #109
Merged
Merged
Conversation
rldyourmnd
marked this pull request as ready for review
October 6, 2026 01:55
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.
Short control frames previously admitted the length prefix and body in two writes. Serialize them into one buffer before write_all, preserving legacy wire bytes, partial-write handling and the size bound. This removes a separate prefix-only admission; it does not guarantee one packet or cancellation-safe writes. Ten wire tests pass.
Slow desktop input/control replies also need viewing-endpoint transmit evidence: server TX counters cannot identify viewer TX loss. Add a weak backend-neutral path observer and a separate bounded observation worker for matched control replies. Numeric process-local control-instance IDs join writes, reads and path observations.
The worker owns one synchronous query and one newest queued request, never waits on input/receipt admission or event reads, and cannot terminate the desktop session if diagnostics fail. Snapshots retain eight live baselines, prefer selected paths, expose coverage/truncation/age/evictions, and preserve unknown/reset deltas. No wire, timeout, endpoint settings, identity or authority changes; no addresses, input/clipboard bodies or credentials.
Validation: macOS strict full-workspace/all-targets desktop/Noq Clippy passed; 307 targeted desktop/transport tests passed, including actual Iroh and owned-Noq observation/connection lifecycle tests. Initial linking hit ENOSPC; the guarded retry passed without a disk guard trigger. Formatting and private-data boundary checks passed. The new framing change requires renewed full workspace/cross-platform checks; those are running. Linux/installed traces remain required. This repairs a diagnostic gap; residual native pauses are still unaccepted.