fix: prevent Windows SessionEnd hook hang (#76)#77
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughFixes for Windows CLI hang via three mechanisms: bounded timeout on login shell PATH capture (prevents indefinite shell startup waits), redirected stdout/stderr on Windows detached spawns (prevents background processes from keeping hook pipes alive), and skipped login path lookup in session-end hooks (avoids timeout on fast shutdown paths). Consistent ChangesWindows Hook Hang and Timeout Fixes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
hook_entry.shor service hooks.session-endno-op hooks.Test Plan
git diff --checkbash -n plugin/scripts/_lib.sh plugin/scripts/hook_entry.sh plugin/scripts/backend-service.sh plugin/scripts/dashboard-service.sh plugin/scripts/smart-install.shuv run --project plugin pytest tests/test_install_scripts.py -quv run --project plugin pytest tests/test_install_scripts.py::test_windows_detached_spawn_closes_hook_output_pipes tests/test_install_scripts.py::test_login_shell_path_lookup_is_bounded tests/test_install_scripts.py::test_detached_spawns_with_log_redirection_preserve_output_on_windows tests/test_install_scripts.py::test_session_end_service_hooks_skip_login_shell_path_lookup tests/test_install_scripts.py::test_service_start_scripts_recover_missing_dependencies_without_cli_command -qFixes #76
Summary by CodeRabbit
Release Notes
Chores
PATHcapture with a bounded timeout to prevent long waits.session-end.Tests
PATHcapture does not hang on slow shells.