Repository navigation
fix(wework): replace local executor socket with stdio - #2056
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (32)
📝 WalkthroughWalkthroughThe PR replaces local executor socket IPC with stdio JSONL, updates executor and Tauri child-process lifecycle handling, changes transport diagnostics and configuration, adds local transcript reconciliation, expands desktop lifecycle E2E coverage, and aligns English and Chinese documentation. ChangesLocal executor stdio migration
Desktop runtime integration
Desktop lifecycle verification
Documentation alignment
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Wework as Wework Tauri App
participant Sidecar as Executor Sidecar
participant Backend as Backend
Wework->>Sidecar: Spawn child and write JSONL requests to stdin
Sidecar-->>Wework: Emit JSONL responses/events on stdout
Sidecar->>Backend: Register local device through Socket.IO
Backend-->>Sidecar: Send remote device requests
Wework->>Sidecar: Close stdin during shutdown
Sidecar-->>Wework: End stdio transport on EOF or child exit
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 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 |
b3f301e to
24fbf41
Compare
24fbf41 to
d964edf
Compare
Summary
Root cause
The local executor lifetime was longer than the renderer event subscription, while socket discovery/reconnection was managed independently. Closing or suspending the window could destroy the WebView listener without stopping the task. On resume, the UI no longer had the terminal event, and restart could also encounter stale socket/address discovery state, leaving the workbench on the organizing screen even though the executor task continued.
Implementation
WEGENT_APP_IPC_DEVICE_ID; standalone Local Executor launches retain the existing Backend Socket.IO transportVerification
cargo fmt --manifest-path executor/Cargo.toml --checkcargo test --manifest-path executor/Cargo.toml -- --test-threads=1cargo test --manifest-path executor/Cargo.toml --test app_startup_contract -- --test-threads=1cargo check --release --manifest-path executor/Cargo.tomlcargo fmt --manifest-path wework/src-tauri/Cargo.toml --checkcargo test --manifest-path wework/src-tauri/Cargo.tomlcargo check --release --manifest-path wework/src-tauri/Cargo.tomlpnpm --dir wework testpnpm --dir wework typecheckpnpm --dir wework lintpnpm --dir wework build(through the real Tauri E2E build)pnpm --dir wework e2e:desktop:lifecycleLifecycle evidence: one executor ready event; unchanged app and executor PIDs; renderer ready count increases from 1 to 2; task remains running after reopen and completes from persisted transcript.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation