fix: bound Go external OS commands and propagate Ctrl+C cancellation#1738
Merged
Conversation
ps and PowerShell Get-CimInstance can hang indefinitely when WMI stalls. Apply a 10-second cap inside unityprocess and use the same bound when tool readiness classifies a live Unity process after timeout. Co-authored-by: Cursor <cursoragent@cursor.com>
osascript and PowerShell focus calls can hang on permission dialogs and compound Unity recovery stalls. Cap them at 10 seconds in unityprocess and bound connection-retry focus rescue with the same deadline. Co-authored-by: Cursor <cursoragent@cursor.com>
Use signal.NotifyContext in dispatcher and project-runner main so in-flight work receives cancellation when the user interrupts the CLI. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThe change adds bounded contexts for Unity process listing and focus commands, validates their deadlines, and propagates interrupt and termination signals through dispatcher and project-runner entrypoints. ChangesTimeouts and graceful shutdown
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
After signal.NotifyContext cancels the root context, call stop again so a second interrupt exits immediately instead of being swallowed. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs:
2026-07-13_uloopハング可能性の全数調査結果.md§1 feature/go-external-command-timeoutsEliminates the remaining indefinitely-blocking Go CLI paths identified in the hang survey:
ps/ PowerShellGet-CimInstanceprocess enumeration at 10s (unityprocess,tool_readiness)osascript/ PowerShell focus commands at 10s and bound connection-retry focus rescuesignal.NotifyContextthrough dispatcher and project-runnermainso Ctrl+C cancels in-flight workTest plan
go testforcli/common/unityprocess,cli/common/clicore,cli/project-runner/internal/projectrunnerscripts/check-go-cli.sh(note:TestCommandHelpUsesWatchToolSchemaForDefaultWatchCommandsalso fails on cleanv3-betacheckout here — unrelated to this change)Made with Cursor