Repository navigation
fix(ios): bound link requests and keep terminal input flowing - #27323
teamleaderleo wants to merge 8 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-557bb07834475125d7ba
|
Found 3 test failures on Blacksmith runners: Failures
|
|
Bead |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-557bb07834475125d7ba
|
Receipts at What hangs: Independent corroboration: this PR's own Fleet: step Filtered suites ( Performance
"Before" means this head with only To unblock: split Agent session: agent session |
|
The typing benchmark now has a fleet route: There are no
On base, |
|
Fleet diagnosis: head Command:
Suspects (not narrowed to one function yet). This PR's changes to Agent session: agent session |
Preserve ordered workspace snapshots and chat gap refill while splitting nested cancellation, continuation and worker closures into named methods for compiler validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-557bb07834475125d7ba
|
Published compiler-repair head The previous compiler hang is addressed by splitting nested task/cancellation/continuation closures in LinkDeadline, BoundedEventStream and DaemonClient into named methods. Base conflict resolution preserves ordered workspace replies/events and chat gap refill. Added a regression combining ordered wire positions with an expired batch reply. The new full kit run is 40941478331. Fleet validation and the controlled baseline typing benchmark still need completed receipts; exact commands and baseline revision are in the body. The validation dispatch message failed because the relay could not read its session directory; a direct broker retry is pending. Keep this draft until the compile/tests, benchmark and independent review at the new head complete. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-557bb07834475125d7ba
Fleet iOS evidence at 3f924ee (base c00c321): blocked on a red of its ownCompile: PASS, no compiler hang. The simulator build (FFI, xcodegen, Demo app) finished in 334 s (step Full CmuxMobileKit run (step
Focused rerun of those two suites (step
Head and base: this PR adds both suites. At base c00c321, Blocker: Not run: the exact-head review and the |
Keep replay fixtures alive through asynchronous notifications and give the handshake test scheduling room while preserving a post-deadline approval assertion. Agent-Session: https://cmux.com/deeplink/agent?id=aid-557bb07834475125d7ba
…mote-b21b23 # Conflicts: # cmux-next-ios/CmuxMobileKit/Sources/CmuxMobileLive/AcpmuxConnection.swift # cmux-next-ios/CmuxMobileKit/Sources/CmuxMobileLive/AcpmuxHub.swift
Notify all active replay generations when the channel closes, preserve the existing acpmux timeout error contract, and allow a one-second handshake scheduling budget in the approval regression fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-557bb07834475125d7ba
|
Fleet run at head b8079db (simulator class, Result: BLOCK, the iOS build fails to compile, so no test ran.
Compile errors (own, in a file this PR changes: it turned
These are not base failures: the old dictionary held a single |
|
The two compile errors reported on Requested a fresh fleet iOS compile and full CmuxMobileKit run at this head, including |
…mote-b21b23 # Conflicts: # cmux-next-ios/CmuxMobileKit/Sources/CmuxMobileLive/AcpmuxHub.swift
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
A missing Mac reply can leave the workspace list, pairing, chat initialization, or terminal input waiting indefinitely. Terminal input also paused new writes once one reply was 500 ms old, even on a healthy high-latency path. This change bounds requests, keeps ordered terminal writes pipelined, and bounds terminal event and chat replay buffers.
Design:
design/ios.md, items B21 and B23.Leo's request:
Daemon requests, batches, and submitted replies have 15-second deadlines; ordinary chat RPCs have 30 seconds. Prompts can include human approval and keep a finite 24-hour turn budget. Pairing has a 15-second handshake budget and a separate 180-second human-approval budget. The eager workspace setup and version response include that authorization budget because the Mac deliberately holds them until approval. Expiry reaches the existing error/retry paths. Late replies are discarded and mutations are not automatically retried.
Terminal input keeps its ordered 64-request window without an RTT-dependent pause. Uncertain writes are never resent. A byte-bounded daemon event queue stops receiving when the terminal falls behind, allowing the existing link flow control to reach the sender. Chat replay retains at most 2,000 events; after overflow, new readers fetch a complete history snapshot while existing readers continue live.
Validation
Draft pending completed fleet tests, the paired benchmark, and independent review at
1c8696ca9805fee0244e4ab49ae4375cece2ad24. No local build or test suite ran.git diff --checkpasses. This changes transport behavior and error propagation; there are no layout or styling changes.Full kit run: https://github.com/manaflow-ai/cmux/actions/runs/41168331197 (pending). Requested: full CmuxMobileKit tests on macOS and iOS simulator, plus repeated focused runs of
AcpmuxReplayResyncTests|LinkRequestDeadlineTests|FeedRefreshTests. Compare any failure by test name and error against a real base run. Earlier validation exposed a compiler closure-lifetime hang, a duplicate test helper, and fixture scheduling/lifetime failures; those have code changes but still require passing receipts at this head.The replay fixture retains both asynchronous owners through live delivery and waits for both readers. The approval fixture replies 1.1 seconds after entering its approval phase, beyond the 1-second handshake budget and within the separate 10-second approval budget. The base integration preserves closed-channel handling for every replay generation and the existing acpmux timeout error code.
Benchmark: run
TerminalInputThroughputTests/keystrokeThroughputAt500msRTTat this head and at base5587de5f8379ceae40f34edc9a160a438e3dc13d. Copy only the unchanged head benchmark file into the base test target; itsFakeTerminalDaemonfixture andtailProbeDelayalready exist on base. Record bothTERMINAL_INPUT_PERFlines: clean path and first reply dropped. The performance table will contain the measured values and run links before landing.The change is about 1,500 lines including regression fixtures and the benchmark. Request expiry, input recovery, and event pressure share the same daemon actor and lifecycle, so their implementation and tests stay together; the small replay-cache change completes the related bounded-stream fix.
Performance
TerminalInputThroughputTests/keystrokeThroughputAt500msRTT, same harness on base and headRisk and cleanup
A slow request now fails instead of waiting indefinitely. Under sustained terminal overload, the existing link stall budget may close that channel and trigger its normal recovery. A new chat reader may make another history request after its replay budget is exhausted. No heartbeat or foreground reconnect policy changes.
Deadline tasks stop on response, failure, cancellation or channel closure; the losing operation is cancelled. Abandoned pairing/version channels and timed-out writes are closed, and late-opened channels are disposed. The bounded queue wakes blocked producers and consumers when closed; cancelled chat readers unregister. Benchmark ACK tasks end after one delayed reply or are cancelled when the synthetic channel closes. No animation loop or observer is added.
Related work: #26500 implements server-event gap refill and pagination; this change bounds the local replay cache and preserves that separate fix. Overlap awareness has been requested.
pr-overlapwas run but its GitHub read was refused by the broker; open and merged PR searches found no duplicate of these request-deadline changes.Agent session: agent session
🤖 Generated with Claude Code