Harden layout validation, watcher lifecycle, and connection robustness - #7924
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR adds a hard-failing existence check for the packaged daemon entry file during electron-builder's afterPack step, applies ORCA_MAC_RELEASE env var to an additional build script, refines WebSocketTransport's start-up port binding to prefer a persisted fallback port before the preferred port, adds idle teardown of the parcel-watcher child process once all subscriptions are removed, and introduces a concurrency-capped queue for restored-tab disk baseline verification in the editor. Corresponding tests and clarifying comments were added or updated across these areas. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d70d6cb9-ae17-41f2-94d6-cdb27c6fc674
⛔ Files ignored due to path filters (1)
evidence-awaiting-permission.pngis excluded by!**/*.png
📒 Files selected for processing (14)
config/electron-builder.config.cjsconfig/scripts/electron-builder-config.test.mjsconfig/scripts/verify-packaged-daemon-entry.cjsconfig/scripts/verify-packaged-daemon-entry.test.mjspackage.jsonsrc/main/index.tssrc/main/ipc/parcel-watcher-process.test.tssrc/main/ipc/parcel-watcher-process.tssrc/main/runtime/rpc/ws-fallback-port-store.tssrc/main/runtime/rpc/ws-transport.test.tssrc/main/runtime/rpc/ws-transport.tssrc/main/runtime/runtime-rpc.tssrc/renderer/src/components/editor/editor-restored-tab-conflict-scan.test.tssrc/renderer/src/components/editor/editor-restored-tab-conflict-scan.ts
- Throw instead of silently skipping when the packaged daemon-entry is missing, preventing layout regressions from passing build checks. - Terminate idle parcel-watcher processes to reclaim native handles and avoid crash-prone native node module teardowns on shutdown. - Bind the persisted WS fallback port first to prevent orphaning active mobile pairings when the preferred port becomes free again. - Cap concurrent disk reads for restored dirty tab verification at three to prevent startup connection bottlenecks on remote SSH workspaces.
This avoids using stale file snapshots (e.g., outdated disk signatures) if a tab is saved, closed, or re-baselined while waiting in the queue behind the concurrency limit. The live state is now fetched from the store and validated immediately before initiating the disk read.
5fb82ad to
6dfdb82
Compare
Clean auto-merge, no conflicts (109 files, +7490 from main). Brought in: - Codex WSL runtime status hooks (#7969); WSL/SSH agent path resolution past shell aliases (#7867); WSL source-control path separators (#7966); WSL GitLab-auth wake fix (#7967); WSL Codex usage RPC refresh (#7567/#7658) - Improve workspace cleanup list (#7053) + background removal - mobile: per-host connection log + Tailscale wedge recovery (#7984/#7980), wake slept agents on mobile worktree open (#7906) - Harden layout validation, watcher lifecycle, connection robustness (#7924) - Disable experimental worktree card style by default (#7977) Perf-branch structure preserved (clean auto-merge). typecheck 0 errors; lint 0 errors. CI is the release gate (local runs skipped per env lag). Co-authored-by: Orca <help@stably.ai>
Summary
Harden package layout validation, parcel watcher process lifecycle, WebSocket connection robustness, and editor tab restoration.
Key changes:
Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildNote: Extensive unit testing added for daemon entry validation ('verify-packaged-daemon-entry.test.mjs'), parcel watcher lifecycle state machine ('parcel-watcher-process.test.ts'), WS port selection fallback strategies ('ws-transport.test.ts'), and tab scan queueing concurrency ('editor-restored-tab-conflict-scan.test.ts').
AI Review Report
The code review with the AI coding agent verified:
Security Audit
A security audit from the AI coding agent confirmed:
Notes