Repository navigation
Webview agent pane waits on live daemon requests - #35206
Conversation
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a Unclear: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base fbf7e36; does not block Shipped in:
|
|
Found 20 test failures on Blacksmith runners: Failures
...and 10 more test failures. View all on Blacksmith: run 41828712367, run 41828712254
|
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
…t-deadlines' into lane/webview-agent-pane-transport-deadlines
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-6f9c700029b79752592a
|
@teamleaderleo this PR made the feat-cmux-next web-lint red ( Still red, and not in #35409: 5 tests in |
#35206 left feat-cmux-next red on the webview checks (nightly webview checks, so no NEXT nightly publishes): - typecheck: agent-pane-peer-copy-paused.test.tsx imported STARTING_READS, which #35206 removed on purpose (a stuck start is read until it leaves the starting stages). The test now asserts that contract: 75 ticks, past the old 60-read cap, are 75 reads, and the timer is never cleared. - typecheck: mock.ts narrowed cmuxAcpmuxMockSlowMs through a repeated cast, which TS does not carry; read it once into a local. - check:fixed-waits: transportDeadlines.test.ts waited a fixed 350 ms. Its mock delay resolved at once, so the reply came back in under 1 ms and only that wait made "elapsed > 20" pass. The test now holds the slow reply until the client's snapshot reports daemonWaitingSince (the 20 ms threshold passed), checks the request is still pending, then releases it and expects {}. Mutating expectReply's deadline back to a reject makes it fail. Verified on a fleet host at f4ebcbc: base typecheck 2 errors and check:fixed-waits 2 waits; head typecheck and check:fixed-waits pass, both test files 9/9 in 5 runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64
|
@teamleaderleo #35423 rewrites the 5 red One gap this PR does not state: a |
…mat) - useCloudChatRecovery.ts:79 bound the recheck's result to a variable it never read (#35206); vp lint fails on that warning. The await stays; the binding goes. - transportDeadlines.test.ts: vp fmt. `bun run check` in webviews/ passes on this branch merged with feat-cmux-next 5f776e0 (base: 3 red, fixed-waits, vp lint, vp check). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64
…ind it, from #35206 (#35409) check:fixed-waits failed on transportDeadlines.test.ts (2 fixed waits, baseline 0). The 350 ms wait was not just a style violation: the test built the mock with an instant delay, so the "600 ms slow reply" came back in under 1 ms and only the wait made the elapsed-time assertion pass. The test passed with direct.ts from before #35206 too. - transportDeadlines.test.ts: the mock holds the slow method's reply until the test sees the client's waiting snapshot (daemonWaitingSince), the event the 20 ms deadline causes on an open socket; then it releases the reply and checks the request resolves and the waiting state clears. No wall-clock wait. Pre-#35206 direct.ts: fails with native.timed_out. - mock.ts: read the slow-method globals once (TS2345 number | undefined; vp check red). - agent-pane-peer-copy-paused.test.tsx: #35206 removed STARTING_READS on purpose (reads continue while the machine starts); the test now proves reads go past the old 3-minute cap with the interval kept (TS2339 and a runtime failure before). - useCloudChatRecovery.ts: drop the binding #35206 left unused (vp lint no-unused-vars). check:pieces stops at the first red, so the last three were hidden behind check:fixed-waits. Red/green (bun test, webviews/): - transportDeadlines.test.ts: head 5/5 pass; with a628f50^ direct.ts: fail, native.timed_out. Landed version with a628f50^ direct.ts: pass (it did not test the fix). - agent-pane-peer-copy-paused.test.tsx: head 8/8 pass; with a628f50^ peerCloudMachine.ts: 1 fail (interval cleared after 60 reads).
… removed 60 s deadline (#35423) #35206 removed useCloudChatRecovery's 60 s recovery deadline on purpose ("removed; retries continue while active"; "a busy machine never turns a slow list into a terminal resume failure"). Five tests still asserted that deadline and failed on the tip. A resume now ends when its request answers (the resume goes on), when the native call fails for good (non-retryable: the daemon is gone; the card shows the error), or when the person leaves the chat (switch, deactivate, unmount). The tests now prove each end, with fake timers and held requests the test answers or fails; no wall-clock wait: - a slow inventory/recheck keeps the resume waiting past the old deadline (10 min) with no timer and no repeated read, until it answers; the answer runs the recheck and the next read. - new: a slow inventory/recheck whose daemon is gone fails the resume with the error. - switching chats ends a hung inventory/recheck with no error and no timer; the old chat's late answer or failure does not touch the new recovery or read for the old chat. - an attach left pending when its resume ends (now: the daemon is gone, was: the deadline): its late rejection leaves a newer resume running; the current attach owns its failure. Gap, not invented here: #35206 states no end for a request that never answers while the bridge stays alive. Today that resume waits until the person leaves the chat (the card has no cancel and disables its actions while resuming). The first two tests assert that explicitly. bun test test/cloud-chat-resume.test.tsx: head 12/12 pass (3 runs). With the hook from a628f50^, 6 fail (the waits now end at its 60 s deadline timer).
… build (#35450) * try-pr.sh: try a pull request the cheapest way, live when it needs no build scripts/cmux-next/try-pr.sh PR reads the PR's diff with git and sorts it with live_apply.py (the rules from the 8,315-PR live-apply study). A web-only PR goes straight to web-overlay.sh follow, so the running app hot-reloads it with no build; a CI/tests/docs PR is nothing to try; a daemon, Swift or resource change says why it needs a new binary and, with --build, requests the fleet dev build tagged pr-N. Tests: python3 -m unittest scripts/cmux-next/tests/test_live_apply.py (10 pass); dry runs on #35314 (rebuild), #35408 (no-app), #35206 and #35205 (web-live). Leo-ask: ask-ffdcb76e34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f164a6206bf2ef9c6b7d * try-pr.sh: lockfiles, bundled scripts and web config are not no-app; honest doc numbers Review follow-ups on #35450: the extension rule now runs after the web, resource and Rust rules, the doc no longer counts swift-live as needing no binary, and --port with no value prints usage. Leo-ask: ask-ffdcb76e34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-f164a6206bf2ef9c6b7d --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo said: “shouldn't be this short. no reason for this. i imagine there's other nonsensical gates like this to remove in the broader app/acpmux”
Webview agent-pane transport requests now remain pending while the WebSocket is open and the daemon is alive. Requests mark visible progress as “Waiting for the agent service”; closed sockets still reject promptly and reconnect retries continue without a terminal cap. The mock supports
?mock&slowDaemonand the regression tests cover a slow but alive daemon.Gates audited:
webviews/src/agent-session/acpmux/direct.ts:4280request deadlineswebviews/src/agent-session/acpmux/direct.ts:3427reconnect backoffwebviews/src/agent-session/acpmux/direct.ts:3450busy retry capwebviews/src/agent-session/acpmux/composerDraft.ts:1395 s write timeoutwebviews/src/agent-session/acpmux/cloudUploads.ts:3030 s page step timeoutwebviews/src/agent-session/acpmux/conversation/RepoRecoveryCard.tsx:9960 s waitwebviews/src/agent-session/acpmux/useCloudChatRecovery.ts:4760 s recovery deadlinewebviews/src/agent-session/acpmux/peerCloudMachine.ts:1660-read start capwebviews/src/agent-session/acpmux/perf.ts:30710 s next-commit timeoutwebviews/src/agent-session/acpmux/folderTrust.ts:741.5 s trust readwebviews/src/agent-session/acpmux/composer/attachmentSources.ts:161.5 s source attributionwebviews/src/agent-session/acpmux/tailCache.ts:66250 ms host tailValidation:
bun test webviews/src/agent-session/acpmux/transportDeadlines.test.ts webviews/src/agent-session/acpmux/requestBudget.test.ts(fleet run after PR creation).agent-identity footer --repo manaflow-ai/cmux
🤖 Generated with Codex
Agent session: agent session