Repository navigation
Ignore stale terminal RPC failures after Cloud transcript reattachment - #16068
teamleaderleo wants to merge 12 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (13)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (12)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughTerminal RPC calls now time out after a deadline and clean up their process and output readers. Transcript operations suppress failures from stale requests. Timeout failures carry a specific event code and display localized text. ChangesTerminal RPC handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant TranscriptAdapter
participant cmuxRpc
participant RPCProcess
participant Deadline
participant foldEvent
TranscriptAdapter->>cmuxRpc: issue terminal RPC
cmuxRpc->>RPCProcess: start CLI process
cmuxRpc->>Deadline: start RPC_TIMEOUT_MS timer
Deadline->>cmuxRpc: return timeout failure
cmuxRpc-->>TranscriptAdapter: return timeout result
TranscriptAdapter->>TranscriptAdapter: create timeout-coded error event
TranscriptAdapter->>foldEvent: fold error event
foldEvent-->>TranscriptAdapter: use localized timeout text
Merge Risk: ⚪ Minimal · up to The change adds a deadline to terminal RPC calls, suppresses stale failure events, and shows localized timeout text. No concrete merge-blocking defect was established. The PR still depends on Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The attachment checks improve isolation of late failures without demonstrating broader terminal access or increased privileges. A terminal timeout can still leave delivery uncertain, so manually retrying a prompt may repeat an action. Attribution of that recovery risk to the lifetime fix versus its prerequisite remains partly unresolved. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 23 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (23 passed)
Full details: Description checkExplanation The description provides a detailed summary, validation results, changelog entry, and known limitations. It does not use the required Summary and Testing headings, and it omits the required Demo Video and Checklist sections for this behavior change. ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review (subagent, parent→head so the diff matches the +92/-1 you wrote, not The guard is the right mechanism and it is better than it looks: should-fix — the error-path net main has is gone and was not restored. Main wraps all three RPC call sites: nit — Order: needs #16065 first ( tsc exit 0, 44 pass / 0 fail, 26 scripts OK. — Raindrop g2 🫧 |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rpc-lifetime Preserve bounded terminal RPC deadlines and fence late failures to their transcript attachment. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
All contributors have signed the CLA ✍️ ✅ |
Keep main's agent chat localization additions alongside terminal RPC timeout copy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CI failure attributionCI failed on
Matched log linesNot re-run automatically: Written by |
* test: reproduce stale terminal focus when reopening a transcript * fix: refresh terminal bindings when reopening Cloud transcripts * test: keep terminal RPC fixture types stable across assertions
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Closing or redirecting a terminal transcript while Send, Stop, or Focus Terminal is waiting for an RPC reply can append the old failure to the replacement view. Fence these callbacks by disposal generation, attachment, target identity, and captured target IDs. Active attachments still report their own failures and preserve failed-send prompts for recovery.
Depends on #16065; this PR targets
fix/cloud-terminal-rpc-deadlineso its diff contains only the lifetime fix. Focus failures now use the same guarded action path and are emitted once.Validation
47d6d2975d5b841a2f24f7f5a815cb031bcefaff.25677e569383a99a9fd3a898328b19b85b069797.agent-chat,bun test/transcript-rpc-lifetime.test.ts: red with the regression commit's adapter (a disposed view must not receive a late terminal RPC failure), green with the fix. Covers Send, Stop, and Focus Terminal across disposal without a reader, redirection, mutable target IDs, and reattachment to identical targets; current failures still arrive.bun test/terminal-rpc-errors.test.ts: passed, including prompt recovery and all 20 locales.bun run check: passed (typecheck, 26 scripts, 44 tests across 13 bun:test files).bun build src/main.tsx src/gallery-main.tsx --target browser --minify --splitting --outdir scratch/build-check --define 'process.env.NODE_ENV="production"': passed.git diff --check 953efca947fb2f5901ec853da03acb04ed8ad49c..HEAD: passed.No live Cloud instance or browser validation. The generic
scripts/verify-local.pyentrypoint is absent from this checkout; scoped Agent Chat checks ran instead.Changelog
Fixed: Cloud Agent Chat ignores late terminal action failures after a transcript closes or switches attachments.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes Cloud Agent Chat terminal RPCs so they no longer hang past their deadline or surface stale failures after a transcript closes or switches attachments. Reopening a Cloud transcript now refreshes the terminal bindings when the agent session or surface changes.
Bug Fixes
Written for commit b80327e. Summary will update on new commits.
Summary by CodeRabbit