Skip to content

feat: Pause Unity at named debug breaks for inspection#1283

Merged
hatayama merged 27 commits into
v3-betafrom
feature/hatayama/pause-point
Jun 4, 2026
Merged

feat: Pause Unity at named debug breaks for inspection#1283
hatayama merged 27 commits into
v3-betafrom
feature/hatayama/pause-point

Conversation

@hatayama

@hatayama hatayama commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Unity projects can add named debug break markers and wait for them from the CLI.
  • Tool Settings now includes the debug break native commands so they can be enabled or disabled consistently.

User Impact

  • Agents can pause Unity at meaningful gameplay states without editing the scene or relying on visual guessing.
  • Input simulation tools now stop safely when a debug break pauses Unity, and timeout or busy responses provide clearer state.
  • Disabled debug break commands are rejected by the native CLI path instead of bypassing Tool Settings.

Changes

  • Adds UnityCliLoopDebug.Break markers, debug-break status, clear, and wait flows, plus runtime pause-point state.
  • Adds CLI support for wait-for-debug-break, debug-break-status, completion options, and settings-managed native command blocking.
  • Updates simulate keyboard and mouse input interruption handling and generated skills.

Verification

  • scripts/check-go-cli.sh
  • 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 exact --filter-value "io.github.hatayama.UnityCliLoop.Tests.Editor.ToolSettingsUseCaseTests.TryGetToolCatalog_WhenRegistryAvailable_IncludesNativeDebugBreakCommands"
  • cli/dist/darwin-arm64/uloop run-tests --test-mode EditMode --filter-type regex --filter-value PausePointTests --project-path "$(git rev-parse --show-toplevel)"
  • cli/dist/darwin-arm64/uloop run-tests --test-mode PlayMode --filter-type regex --filter-value "Simulate(MouseInput|Keyboard)Tests.*DebugBreak|SmoothDelta_WhenDebugBreak" --project-path "$(git rev-parse --show-toplevel)"
  • go test ./internal/cli -run "TestRunProjectLocalWaitForDebugBreakRespectsToolSettings|TestRunDebugBreakStatusReturnsCurrentStatus"
  • codex-review v3-beta clean

hatayama added 20 commits June 3, 2026 14:22
Introduce an editor-only pause point marker API modeled on Unity's conditional call-site pattern, plus first-party arm and clear tools backed by an internal status bridge. This replaces direct Debug.Break usage with an armed marker flow that can expire or be cleared safely.
Add the native wait-for-pause-point command so agents can poll marker hits without occupying the normal Unity tool slot. Document the arm/wait/inspect flow and point input simulation skills at pause points for ambiguous gameplay verification.
Align the public marker API with the Unity CLI Loop C# naming style and keep future debug helpers under UnityCliLoopDebug.
Clear stale terminal pause point states during bulk clear, remove first-party schema description attributes, and keep the architecture dependency test aligned with the public pause point runtime assembly.
Align the command names with UnityCliLoopDebug.Break by exposing arm-debug-break, wait-for-debug-break, and clear-debug-break instead of the pause-point wording.
Use enable-debug-break for the user-facing CLI command so the action reads as enabling a UnityCliLoopDebug.Break marker. Keep the internal armed status contract while aligning help text, tool metadata, and skill guidance with the clearer command name.
Treat a pause during keyboard or mouse input observation as a successful debug-break interruption so the tool slot is released and agents can inspect the paused Unity state instead of hitting Busy forever.
Expose debug-break-status as a CLI-only marker inspection command, surface PlayMode Domain Reload risk when enabling markers before Play, and include running/requested tool plus Unity play state in Busy responses so agents can diagnose paused-editor stalls.
Clarify marker placement for keyboard and mouse verification, document debug-break-status, and sync generated agent skills so agents can discover the workflow without relying on prompt-specific instructions.
Report enabled terminology and pause/play details in debug break wait failures so agents can distinguish a missed marker path from an already-paused Editor or marker lifetime issue.
Rename the wait status elapsed field to describe that it is measured since enable-debug-break, and include marker id/count when keyboard or mouse simulation is interrupted by a UnityCliLoopDebug.Break marker. This keeps input interruption responses actionable without mixing log or scene inspection responsibilities into the wait command.
Flush keyboard and mouse cleanup when Unity is paused so debug-break inspection does not leave injected input state active after the tool returns.
Wait one runtime frame after each SmoothDelta injection so gameplay Update can hit a debug-break marker before the next input update is scheduled.
Require the CLI release that includes the new native debug-break commands so package users get an update prompt instead of unknown-command failures.
Clarify short input durations, add compile hints for test asmdef setup, and avoid reading Unity editor state from background-thread busy responses so parallel commands return server_busy instead of internal Unity thread errors.
Keep the v3-beta branch diff clean for git diff --check after generated Unity meta files were added.
Preserve unknown play state in server-busy responses and add a final status probe before clearing wait-for-debug-break timeouts.
Show wait-for-debug-break and debug-break-status alongside built-in tools, and make the native CLI dispatch respect disabled tool settings so the checkbox state matches command behavior.
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Implements a complete debug-break pause-point feature allowing users to place named pause markers in Unity gameplay code, enable/clear them via CLI tools, and detect interruptions in keyboard/mouse input simulations with full debug metadata (marker ID, hit count) reported in response payloads. Updates tool busy exceptions to capture editor play-state context; extends JSON-RPC error responses accordingly.

Changes

Debug Break Pause-Point Implementation

Layer / File(s) Summary
Core pause-point registry and runtime infrastructure
Packages/src/Runtime/PausePoints/UloopPausePointRegistry.cs, Packages/src/Runtime/PausePoints/UnityCliLoopDebug.cs, Packages/src/Runtime/PausePoints/AssemblyInfo.cs
Foundation pause-point registry managing enablement with timeout, hit recording with pause request, per-ID status queries, and state snapshots; editor-only Break(string id) method marked with [Conditional("UNITY_EDITOR")]; assembly visibility grants for editor/test/infrastructure assemblies.
Enable/Clear debug-break tools with response mapping
Packages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.cs, Packages/src/Editor/Infrastructure/Api/PausePointStatusBridgeCommand.cs, Packages/src/Editor/Infrastructure/Api/InternalBridgeCommandRouter.cs
First-party EnablePausePointTool and ClearPausePointTool implementing tool contracts; schema/response/use-case classes; domain-reload warning logic; CLI bridge command routing for status retrieval/clearing; internal PausePointStatusResponse DTO.
Input simulation pause detection and interruption results
Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs, Packages/src/Editor/FirstPartyTools/Common/InputSimulation/InputSimulationDurationFormatter.cs, Packages/src/Editor/FirstPartyTools/Common/InputSimulation/UnityCliLoopInputSimulationTypes.cs
Input system helpers with InputSimulationWaitOutcome enum distinguishing pause vs normal completion; press/observation/runtime frame wait methods return outcome; configurable test pause provider; duration formatter for result messages; keyboard/mouse result types with InterruptedByDebugBreak, DebugBreakId, DebugBreakHitCount.
Keyboard simulation pause detection and debug-break reporting
Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardUseCase.cs, Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardResponse.cs, Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardTool.cs
Use case detects pause outcomes, returns interrupted results with debug-break metadata from registry; response properties for interruption flag/id/count; response mapping emits metadata; paused key-state release via explicit input update.
Mouse input simulation pause detection and debug-break reporting
Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputUseCase.cs, Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputResponse.cs, Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputTool.cs
All mouse actions (click, long-press, move-delta, scroll, smooth-delta) detect pause, return interrupted results with registry metadata; button-state and delta-reset handle paused editor state; response mapping includes interruption fields.
Tool busy exceptions and editor state capture
Packages/src/Editor/Application/UnityCliLoopToolBusyException.cs, Packages/src/Editor/Application/UnityCliLoopToolExecutionService.cs, Packages/src/Editor/Application/UnityCliLoopEditorStateGuard.cs
Exception constructor expanded with optional isPlaying/isPaused parameters; execution service conditionally captures editor state when on main thread; state guard passes context to exception during compile/update busy conditions.
JSON-RPC and error envelope busy state metadata
Packages/src/Editor/Infrastructure/Api/JsonRpcProcessor.cs, cli/internal/cli/busy_status.go
JSON-RPC server_busy error payload extended with nullable isPlaying/isPaused fields; error envelope writers pass and emit busy state details; CLI busy status struct carries state fields for reporting to users.
Go CLI wait-for-debug-break and debug-break-status commands
cli/internal/cli/debug_break_wait.go
Complete CLI implementation: command/flag constants, flag parsing for --id and --timeout-seconds, polling loop with timeout context, status query/clear via Unity IPC, structured error construction for terminal states, remaining-time calculation.
CLI error codes, routing, and tool settings integration
cli/internal/cli/error_envelope.go, cli/internal/cli/command_registry.go, cli/internal/cli/run.go, cli/internal/cli/native_tool_settings.go, cli/internal/cli/execution_errors.go, cli/internal/cli/skills_targets.go
New error codes for debug-break states; command registry entries for wait-for-debug-break and debug-break-status; run.go dispatch routing; native tool settings checks to gate disabled commands; completion options moved to separate file.
Tool constants, settings, and default tools
Packages/src/Editor/ToolContracts/UnityCliLoopConstants.cs, Packages/src/Editor/Application/UseCases/ToolSettingsUseCase.cs, cli/internal/tools/default-tools.json
Added tool/command name constants; tool settings use case includes native debug-break commands in catalog; default-tools.json entries for enable-debug-break and clear-debug-break.
Editor test coverage for pause-point registry and integration
Assets/Tests/Editor/PausePointTests.cs, Assets/Tests/Editor/ToolSettingsUseCaseTests.cs, Assets/Tests/Editor/UnityCliLoopToolExecutionServiceTests.cs, Assets/Tests/Editor/UnityCliLoopToolRegistryTests.cs, Assets/Tests/Editor/OnionAssemblyDependencyTests.cs, Assets/Tests/Editor/CliSetupApplicationServiceTests.cs, Assets/Tests/Editor/CompileSessionResultServiceTests.cs, Assets/Tests/Editor/InputSimulationDurationFormatterTests.cs, Assets/Tests/Editor/JsonRpcProcessorCliVersionGateTests.cs
Pause-point registry state transition tests, hit recording, timeout/clear semantics, editor settings warnings; tool registration and type lookup; execution service state capture when off main thread; assembly dependency validation; minimum CLI version updated to 3.0.0-beta.25; compile-result test framework hint; input duration formatter behavior; busy-state payload assertions.
PlayMode test coverage for keyboard/mouse pause interruptions
Assets/Tests/PlayMode/SimulateKeyboardTests.cs, Assets/Tests/PlayMode/SimulateMouseInputTests.cs
Keyboard tests for press/key-operation interruptions via pause and debug-break markers; mouse tests for click/delta interruptions; observer components triggering markers from gameplay; pause provider configuration; registry reset in teardown.
Go CLI test coverage for wait-for-debug-break and debug-break-status
cli/internal/cli/debug_break_wait_test.go, cli/internal/cli/error_envelope_test.go
Tests for successful hit transitions, timeout/clear, final-probe boundary conditions, not-enabled rejection, error reporting with play-state, tool-settings disabling, option parsing, debug-break-status JSON output; updated error envelope fixtures with isPlaying/isPaused.
Skill documentation for debug-break workflows
.agents/skills/uloop-simulate-keyboard/SKILL.md, .agents/skills/uloop-simulate-mouse-input/SKILL.md, .agents/skills/uloop-wait-for-debug-break/SKILL.md, .claude/skills/uloop-simulate-keyboard/SKILL.md, .claude/skills/uloop-simulate-mouse-input/SKILL.md, .claude/skills/uloop-wait-for-debug-break/SKILL.md, Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
Workflow documentation describing marker placement, enable/clear/wait CLI commands, timeout inspection, metadata interpretation (InterruptedByDebugBreak, DebugBreakId, DebugBreakHitCount); safety constraints (editor-only, asmdef, domain-reload); added to both .agents and .claude skill directories.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/hatayama/pause-point

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs (1)

36-75: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Make ApplyOnNextConfiguredUpdate pause-aware.

WaitForObservationFrames / WaitForPressLifetime now return InputSimulationWaitOutcome.Paused, but callers can still block before reaching those pause-aware waits: InputSystemUpdateHelper.ApplyOnNextConfiguredUpdate completes only when InputSystem.onBeforeUpdate fires (or ct is canceled). If Unity gets paused after the callback is subscribed but before the next onBeforeUpdate, the awaited task may never complete, so flows like SimulateMouseInputUseCase.ExecuteSmoothDelta can get stuck holding the tool’s execution/held input state until resume.

Update ApplyOnNextConfiguredUpdate to short-circuit on EditorApplication.isPaused (or use the explicit-update fallback approach used by ApplyOnExplicitUpdate) so callers always reach the existing pause-handling paths.

🤖 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
`@Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs`
around lines 36 - 75, ApplyOnNextConfiguredUpdate can hang if the editor is
paused after subscribing to InputSystem.onBeforeUpdate; after resolving
targetUpdateType, detect EditorApplication.isPaused and short-circuit to the
explicit-update path by returning ApplyOnExplicitUpdate(apply, targetUpdateType,
ct) (same approach used when InputUpdateTypeResolver.RequiresExplicitUpdate() is
true). Keep the existing onBeforeUpdate subscription logic for the non-paused
case and preserve cancellation handling via ct.Register as before.
🧹 Nitpick comments (1)
cli/internal/cli/debug_break_wait_test.go (1)

303-327: ⚡ Quick win

Cover debug-break-status in the disabled-settings regression test.

The shared guard in cli/internal/cli/native_tool_settings.go covers both wait-for-debug-break and debug-break-status, but this test only proves the wait path. Adding the status command as a second table row would protect the shared settings gate from future constant or dispatch drift.

🤖 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/internal/cli/debug_break_wait_test.go` around lines 303 - 327, The test
TestRunProjectLocalWaitForDebugBreakRespectsToolSettings only exercises
debugBreakWaitCommandName; extend it to also exercise the peer command
("debug-break-status" or the constant debugBreakStatusCommandName) so the shared
guard in native_tool_settings.go is covered for both paths—either convert the
test into a small table-driven loop over []string{debugBreakWaitCommandName,
debugBreakStatusCommandName} (or the literal "debug-break-status") and run the
same RunProjectLocal/assertions for each command, or duplicate the
RunProjectLocal/assertion block for the status command; keep the same
expectations (exit code 1 and error envelope fields matching
errorCodeToolDisabled and the command name).
🤖 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.

Outside diff comments:
In
`@Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs`:
- Around line 36-75: ApplyOnNextConfiguredUpdate can hang if the editor is
paused after subscribing to InputSystem.onBeforeUpdate; after resolving
targetUpdateType, detect EditorApplication.isPaused and short-circuit to the
explicit-update path by returning ApplyOnExplicitUpdate(apply, targetUpdateType,
ct) (same approach used when InputUpdateTypeResolver.RequiresExplicitUpdate() is
true). Keep the existing onBeforeUpdate subscription logic for the non-paused
case and preserve cancellation handling via ct.Register as before.

---

Nitpick comments:
In `@cli/internal/cli/debug_break_wait_test.go`:
- Around line 303-327: The test
TestRunProjectLocalWaitForDebugBreakRespectsToolSettings only exercises
debugBreakWaitCommandName; extend it to also exercise the peer command
("debug-break-status" or the constant debugBreakStatusCommandName) so the shared
guard in native_tool_settings.go is covered for both paths—either convert the
test into a small table-driven loop over []string{debugBreakWaitCommandName,
debugBreakStatusCommandName} (or the literal "debug-break-status") and run the
same RunProjectLocal/assertions for each command, or duplicate the
RunProjectLocal/assertion block for the status command; keep the same
expectations (exit code 1 and error envelope fields matching
errorCodeToolDisabled and the command name).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 838f0dcc-3af0-437a-ba3f-3b5a83f1f4e1

📥 Commits

Reviewing files that changed from the base of the PR and between 447a697 and e2deb9d.

⛔ Files ignored due to path filters (25)
  • Assets/Tests/Editor/InputSimulationDurationFormatterTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/PausePointTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/ToolSettingsUseCaseTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/UnityCLILoop.Tests.Editor.asmdef is excluded by none and included by none
  • Assets/Tests/Editor/UnityCliLoopToolExecutionServiceTests.cs.meta is excluded by none and included by none
  • Assets/Tests/PlayMode/UnityCLILoop.Tests.PlayMode.asmdef is excluded by none and included by none
  • Packages/src/Editor/CliOnlyTools~/PausePoint.meta is excluded by none and included by none
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill.meta is excluded by none and included by none
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/Common/InputSimulation/InputSimulationDurationFormatter.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/PausePoint.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/PausePoint/UnityCLILoop.FirstPartyTools.PausePoint.Editor.asmdef is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/PausePoint/UnityCLILoop.FirstPartyTools.PausePoint.Editor.asmdef.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/UnityCLILoop.FirstPartyTools.SimulateKeyboard.Editor.asmdef is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/UnityCLILoop.FirstPartyTools.SimulateMouseInput.Editor.asmdef is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/UnityCLILoop.FirstPartyTools.Editor.asmdef is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/Api/PausePointStatusBridgeCommand.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/UnityCLILoop.Infrastructure.asmdef is excluded by none and included by none
  • Packages/src/Runtime/PausePoints.meta is excluded by none and included by none
  • Packages/src/Runtime/PausePoints/AssemblyInfo.cs.meta is excluded by none and included by none
  • Packages/src/Runtime/PausePoints/UloopPausePointRegistry.cs.meta is excluded by none and included by none
  • Packages/src/Runtime/PausePoints/UnityCLILoop.PausePoints.Runtime.asmdef is excluded by none and included by none
  • Packages/src/Runtime/PausePoints/UnityCLILoop.PausePoints.Runtime.asmdef.meta is excluded by none and included by none
  • Packages/src/Runtime/PausePoints/UnityCliLoopDebug.cs.meta is excluded by none and included by none
📒 Files selected for processing (56)
  • .agents/skills/uloop-simulate-keyboard/SKILL.md
  • .agents/skills/uloop-simulate-mouse-input/SKILL.md
  • .agents/skills/uloop-wait-for-debug-break/SKILL.md
  • .claude/skills/uloop-simulate-keyboard/SKILL.md
  • .claude/skills/uloop-simulate-mouse-input/SKILL.md
  • .claude/skills/uloop-wait-for-debug-break/SKILL.md
  • Assets/Tests/Editor/CliSetupApplicationServiceTests.cs
  • Assets/Tests/Editor/CompileSessionResultServiceTests.cs
  • Assets/Tests/Editor/InputSimulationDurationFormatterTests.cs
  • Assets/Tests/Editor/JsonRpcProcessorCliVersionGateTests.cs
  • Assets/Tests/Editor/OnionAssemblyDependencyTests.cs
  • Assets/Tests/Editor/PausePointTests.cs
  • Assets/Tests/Editor/ToolSettingsUseCaseTests.cs
  • Assets/Tests/Editor/UnityCliLoopToolExecutionServiceTests.cs
  • Assets/Tests/Editor/UnityCliLoopToolRegistryTests.cs
  • Assets/Tests/PlayMode/SimulateKeyboardTests.cs
  • Assets/Tests/PlayMode/SimulateMouseInputTests.cs
  • Packages/src/Editor/Application/UnityCliLoopEditorStateGuard.cs
  • Packages/src/Editor/Application/UnityCliLoopToolBusyException.cs
  • Packages/src/Editor/Application/UnityCliLoopToolExecutionService.cs
  • Packages/src/Editor/Application/UseCases/ToolSettingsUseCase.cs
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/Common/InputSimulation/InputSimulationDurationFormatter.cs
  • Packages/src/Editor/FirstPartyTools/Common/InputSimulation/UnityCliLoopInputSimulationTypes.cs
  • Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs
  • Packages/src/Editor/FirstPartyTools/Compile/CompileSessionResultService.cs
  • Packages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.cs
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardResponse.cs
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardTool.cs
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardUseCase.cs
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputResponse.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputTool.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputUseCase.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/Skill/SKILL.md
  • Packages/src/Editor/Infrastructure/Api/InternalBridgeCommandRouter.cs
  • Packages/src/Editor/Infrastructure/Api/JsonRpcProcessor.cs
  • Packages/src/Editor/Infrastructure/Api/PausePointStatusBridgeCommand.cs
  • Packages/src/Editor/ToolContracts/UnityCliLoopConstants.cs
  • Packages/src/Runtime/PausePoints/AssemblyInfo.cs
  • Packages/src/Runtime/PausePoints/UloopPausePointRegistry.cs
  • Packages/src/Runtime/PausePoints/UnityCliLoopDebug.cs
  • cli/internal/cli/busy_status.go
  • cli/internal/cli/command_help.go
  • cli/internal/cli/command_registry.go
  • cli/internal/cli/completion.go
  • cli/internal/cli/completion_options.go
  • cli/internal/cli/debug_break_wait.go
  • cli/internal/cli/debug_break_wait_test.go
  • cli/internal/cli/error_envelope.go
  • cli/internal/cli/error_envelope_test.go
  • cli/internal/cli/execution_errors.go
  • cli/internal/cli/native_tool_settings.go
  • cli/internal/cli/run.go
  • cli/internal/cli/skills_targets.go
  • cli/internal/tools/default-tools.json
💤 Files with no reviewable changes (1)
  • cli/internal/cli/completion.go

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 81 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread Packages/src/Editor/Application/UnityCliLoopToolExecutionService.cs
Comment thread Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
Comment thread .claude/skills/uloop-wait-for-debug-break/SKILL.md
hatayama added 6 commits June 4, 2026 15:48
Keep the latest play/pause state on the main thread so busy responses created before the request reaches the main thread can still include diagnostics.

Also document the New Input System prerequisite for debug-break workflows that use simulated input.
Avoid prompting agents to change Player Settings while following the wait-for-debug-break workflow. Keep the generated skill copies in sync with the source skill.
Describe wait-for-debug-break as a runtime checkpoint tool so agents consider it for gameplay, UI, async, physics, and state transitions instead of only simulated input checks.
Describe wait-for-debug-break as a normal PlayMode E2E checkpoint tool instead of a fallback for failed screenshots, and sync the generated skill copies.
Include frame-specific PlayMode bugs in the wait-for-debug-break trigger so agents use it for development debugging as well as E2E transition proof.
Guide agents to use wait-for-debug-break when they would otherwise rely on sleep, repeated polling, or a second state read for transient PlayMode state.
Require CLI 3.0.0-beta.26 so the Unity package rejects older native CLIs that do not include the debug-break command contract.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Assets/Tests/Editor/CliSetupApplicationServiceTests.cs (1)

41-41: ⚡ Quick win

Assert against CliConstants instead of string literals.

These tests duplicate version/tag literals, which can drift from the source contract on future bumps.

Proposed change
-            Assert.That(service.GetMinimumRequiredCliVersion(), Is.EqualTo("3.0.0-beta.26"));
+            Assert.That(service.GetMinimumRequiredCliVersion(), Is.EqualTo(CliConstants.MINIMUM_REQUIRED_CLI_VERSION));
...
-            Assert.That(service.GetMinimumRequiredCliReleaseTag(), Is.EqualTo("cli-v3.0.0-beta.26"));
+            Assert.That(service.GetMinimumRequiredCliReleaseTag(), Is.EqualTo(CliConstants.MINIMUM_REQUIRED_CLI_RELEASE_TAG));

Also applies to: 52-52

🤖 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 `@Assets/Tests/Editor/CliSetupApplicationServiceTests.cs` at line 41, Replace
the hard-coded version string in the test with the shared constant from the CLI
contract: change the assertion to compare service.GetMinimumRequiredCliVersion()
against CliConstants.MinimumRequiredCliVersion (and update the other occurrence
mentioned) so the test uses the canonical source of truth instead of a literal.
🤖 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 `@Assets/Tests/Editor/CliSetupApplicationServiceTests.cs`:
- Line 41: Replace the hard-coded version string in the test with the shared
constant from the CLI contract: change the assertion to compare
service.GetMinimumRequiredCliVersion() against
CliConstants.MinimumRequiredCliVersion (and update the other occurrence
mentioned) so the test uses the canonical source of truth instead of a literal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 34b4b2cd-a1dc-4895-a224-5f45e05a8a6b

📥 Commits

Reviewing files that changed from the base of the PR and between b391520 and 8a3eb5e.

📒 Files selected for processing (7)
  • .agents/skills/uloop-wait-for-debug-break/SKILL.md
  • .claude/skills/uloop-wait-for-debug-break/SKILL.md
  • Assets/Tests/Editor/CliSetupApplicationServiceTests.cs
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
  • Packages/src/Editor/Domain/CliConstants.cs
  • cli/contract.json
  • cli/internal/tools/default-tools.json
✅ Files skipped from review due to trivial changes (2)
  • Packages/src/Editor/Domain/CliConstants.cs
  • cli/contract.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • cli/internal/tools/default-tools.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant