fix: Launch V2 Unity projects without hanging#1826
Conversation
Keep V2 launch in the dispatcher so it can confirm a fresh UnityLockfile without depending on the V3 named-pipe server. Other V2 commands remain delegated to the V2 CLI.
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughV2 launch commands remain in the native dispatcher. New V2 launch flows wait for a fresh Unity lockfile, skip V3 server readiness probes, and emit V2-specific launch responses with structured timeout handling. ChangesV2 Native Launch Handling
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant Dispatcher
participant Unity
participant Lockfile
User->>Dispatcher: Run V2 launch command
Dispatcher->>Unity: Start or find Unity process
Unity->>Lockfile: Update project lockfile
Dispatcher->>Lockfile: Poll for post-launch modification
Lockfile-->>Dispatcher: Confirm fresh lockfile
Dispatcher-->>User: Write V2 project-open response
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Keep the dispatcher launch entrypoint within the focused-file size limit and remove the unused timeout state found by CI.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cli/dispatcher/internal/dispatcher/launch_v2_lockfile.go (1)
12-15: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove unused
projectRootfield.The
projectRootfield is never populated or used. TheToCLIErrormethod accurately relies oncontext.ProjectRootinstead, making this struct field redundant.♻️ Proposed refactor
type v2LaunchLockfileTimeoutError struct { - projectRoot string lockfilePath string }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cli/dispatcher/internal/dispatcher/launch_v2_lockfile.go` around lines 12 - 15, Remove the unused projectRoot field from v2LaunchLockfileTimeoutError, keeping lockfilePath and the existing ToCLIError behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@cli/dispatcher/internal/dispatcher/launch_v2_lockfile.go`:
- Around line 12-15: Remove the unused projectRoot field from
v2LaunchLockfileTimeoutError, keeping lockfilePath and the existing ToCLIError
behavior unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8ec6d996-7c5f-4570-a5a0-49580beb142d
📒 Files selected for processing (8)
cli/dispatcher/internal/dispatcher/dispatcher_v2_detect_test.gocli/dispatcher/internal/dispatcher/dispatcher_v2_run.gocli/dispatcher/internal/dispatcher/launch.gocli/dispatcher/internal/dispatcher/launch_deps.gocli/dispatcher/internal/dispatcher/launch_ready.gocli/dispatcher/internal/dispatcher/launch_test.gocli/dispatcher/internal/dispatcher/launch_v2_lockfile.gocli/dispatcher/internal/dispatcher/launch_v2_lockfile_test.go
Remove non-semantic whitespace so the source remains at the repository physical-line limit enforced by CI.
Keep launch orchestration focused and satisfy the repository source-file size guard without relying on non-formatted whitespace.
Preserve the function separator required by the CI Go formatter after extracting Unity executable resolution.
Summary
User Impact
uloop launchno longer waits up to ten minutes for a V3 named pipe that V2 projects never create.-qand-rprocess management continues to work for V2 projects.Changes
launchout of V2 CLI delegation; live V2 commands remain delegated.Verification
go test ./... -count=1fromcli/dispatcher-q,-r, and forced-stop stale-lockfile relaunchscripts/check-go-cli.shwas attempted but Git Bash misreported Windows-pathcli/commonas containing no Go files; CI will run the authoritative check.