fix: Make Unity readiness and PlayMode stop results clearer#1300
Conversation
Report explicit readiness JSON after launch waits for Unity CLI Loop server access, and distinguish no-op PlayMode Stop responses with structured change fields. Update the synced skill docs so agents can rely on the new output contract.
|
Warning Review limit reached
More reviews will be available in 5 minutes and 4 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR extends the play mode control response with state-transition metadata ( ChangesControl Play Mode Response Enhancement
Launch Readiness Output & Flow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 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 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 |
There was a problem hiding this comment.
1 issue found across 14 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cli/internal/cli/launch_ready.go">
<violation number="1" location="cli/internal/cli/launch_ready.go:36">
P2: `panic(err)` is used for `json.Marshal` failure, which is inconsistent with the codebase convention. Every other `json.Marshal` call in the `cli` package handles errors gracefully. Replace `panic(err)` with proper error handling that writes a classified error to stderr or returns early.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
The PR changes Go CLI response behavior that the Unity package now documents and consumes. Update the package minimum CLI version and release contract files so the CI minimum-version guard recognizes the new CLI contract.
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Replace the launch ready response panic path with the CLI error envelope flow used by neighboring command code. Also keep CLI setup tests tied to the version constants so minimum CLI bumps do not leave stale hardcoded expectations.
Summary
User Impact
uloop launch -rfinished at Unity startup or at CLI readiness.control-play-mode --action Stopnow reportsChangedandWasAlreadyStopped, so cleanup commands can tell whether they actually stopped Play Mode.Changes
Verification
go test ./internal/cli -run "TestRunLaunchWritesReadyResponseAfterToolReadiness|TestRunControlPlayModeWithStateWaitPreservesStopChangeFields"scripts/check-go-cli.shcli/dist/darwin-arm64/uloop launch -r --project-path "$(git rev-parse --show-toplevel)"cli/dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)"cli/dist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode EditMode --filter-type regex --filter-value "io.github.hatayama.UnityCliLoop.Tests.Editor.ControlPlayModeUseCaseTests"cli/dist/darwin-arm64/uloop control-play-mode --project-path "$(git rev-parse --show-toplevel)" --action Stopgit diff --check