Repository navigation
fix: keep session restore responsive during git discovery - #4945
ogulcancelik merged 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughSession restoration preserves saved worktree membership and defers Git metadata discovery to a background refresh. Worktree operations return Suggested reviewers: Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No concrete outstanding issue is established for this change. It appears ready to merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change improves startup responsiveness while guarding operations that depend on restored worktree identity. No new security flaw was established in the reviewed paths. Residual uncertainty concerns indefinitely stalled validation and deployment access controls. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
e992378 to
6eef9b1
Compare
|
Both previous findings were addressed in 6eef9b1 and their threads have been resolved with implementation and regression-test details. The latest Linux, macOS, Windows, and ConPTY CI checks pass. @coderabbitai review Please re-review the current head, especially the independent bounded membership-validation queue and the guards covering all group-close paths. |
✅ Action performedReview finished.
|
|
ty |
Session restore reads Git metadata synchronously before the server enters its event loop. If a restored checkout's Git config or other metadata stalls, the server can accept socket connections but stop answering workspace, session, agent, and shutdown requests after logging the first spawned pane.
Restore workspace state with fallback labels and refresh optional Git metadata through the existing single detached worker, including headless servers and sidebars without Git tokens. Validate saved worktree memberships independently with up to four one-shot detached workers. Prevent worktree operations and group closes from using pending memberships, and apply results only when the workspace and saved membership still match. An invalidated membership emits the existing workspace update event.
refs #4926
Reproduction and validation
.git/configread pending with a FIFO, and restored the session through an isolated launchd job. Before this change, the server stalled after the first pane spawn; a process sample located the blocking read inside restore-time Git discovery.workspace.list,session.snapshot, andagent.listresponded, andserver stopcompleted while the Git read remained blocked.NEXTEST_TEST_THREADS=4 just ci: 3,726 Rust tests passed (12 repository skips), plus maintenance, architecture, and integration asset tests.just checkalso reached Windows cross-lint after passing its native CI dependency. Cross-lint could not run because this host has no Windows SDK configured; the PR's native Windows CI supplies that coverage.just docs-contract-test: 7 passed.The reporter's original session file is unavailable, and an ordinary three-workspace launchd restore did not reproduce the hang. This fixes the confirmed blocking path that reproduces the reported symptoms; it does not establish that unavailable Git metadata caused the reporter's exact session to hang. No configuration, wire protocol, or persisted session format changes are needed.
Validation workers are bounded: permanently stalled reads retain their slots. The existing optional Git status worker remains serialized. This does not change synchronous discovery in worktree lookup when a workspace has no saved membership or cached metadata; that pre-existing path can still block on unavailable storage during explicit worktree operations.