Skip to content

perf(desktop): coalesce control admission and observe viewer transmit stalls - #109

Merged
rldyourmnd merged 2 commits into
mainfrom
fix/desktop-uplink-loss-observation-20261006
Oct 6, 2026
Merged

rldyourmnd merged 2 commits into
mainfrom
fix/desktop-uplink-loss-observation-20261006

Conversation

@rldyourmnd

@rldyourmnd rldyourmnd commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

@rldyourmnd rldyourmnd changed the title feat(desktop): observe viewer transmit paths without blocking control perf(desktop): coalesce control admission and observe viewer transmit stalls Oct 6, 2026
@rldyourmnd
rldyourmnd marked this pull request as ready for review October 6, 2026 01:55
@rldyourmnd
rldyourmnd merged commit 29e3924 into main Oct 6, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant