Skip to content

fix: run-tests hangs no longer hold the tool slot for up to 30 minutes#1742

Merged
hatayama merged 3 commits into
v3-betafrom
feature/run-tests-hang-hardening
Jul 13, 2026
Merged

fix: run-tests hangs no longer hold the tool slot for up to 30 minutes#1742
hatayama merged 3 commits into
v3-betafrom
feature/run-tests-hang-hardening

Conversation

@hatayama

@hatayama hatayama commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Refs: hang survey section 2 / umbrella feature/run-tests-hang-hardening

Summary

  • Hung or frozen Unity Test Runner waits now time out on the C# side (default 600s, max 1500s) instead of holding the single-flight tool slot until the CLI 30-minute absolute limit
  • Cancel/timeout exits Play Mode before re-enabling domain reload, and abandoned scope state cannot poison the next run

User Impact

  • Before: a missing RunFinished callback could keep other uloop commands BUSY for up to 30 minutes; cancel could leave Play Mode / reload settings inconsistent
  • After: agents get an actionable timeout, Play Mode is restored, and the next run-tests can start cleanly

Included PRs

Real-device verification (checklist)

  • Intentionally hung PlayMode test (yield return null loop) with --timeout-seconds 8
  • Timeout response fired with Play Mode exit was requested and confirmed
  • Editor left not-playing after timeout
  • Follow-up EditMode run-tests passed (27 tests) without relaunch
  • Temporary hang fixture removed after the smoke check (not committed)

Notes

  • Option A (reflection CancelTestRun) remains pending explicit user permission; Option B baseline ships here. If approved, wire TryCancelTestRun in a follow-up.
  • Sub-PRs targeting this umbrella did not run full Actions CI (workflows only on main/v3-beta); this PR should get the normal CI set.

Test plan

  • CI green on this PR
  • Local hang → timeout → PlayMode cleared → next run-tests OK
  • Spot-check uloop run-tests --help shows --timeout-seconds after uloop sync

Made with Cursor

Review in cubic

hatayama and others added 3 commits July 13, 2026 14:48
…g the tool slot for 30 minutes (#1739)

Co-authored-by: Cursor <cursoragent@cursor.com>
…eload (#1740)

Co-authored-by: Cursor <cursoragent@cursor.com>
…xt PlayMode test run (#1741)

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a75fb143-2181-4d6a-ad53-2f86d6eb67ab

📥 Commits

Reviewing files that changed from the base of the PR and between ddb0581 and 642bf13.

⛔ Files ignored due to path filters (4)
  • Packages/src/Editor/FirstPartyTools/RunTests/RunTestsCancelStopRestore.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/RunTests/RunTestsExecutionTimeout.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/RunTests/TestFramework/RunTestsCancelStopRestoreUnityHooks.cs.meta is excluded by none and included by none
  • tests/RunTestsExecutionTimeout.UnitTests/RunTestsExecutionTimeout.UnitTests.csproj is excluded by none and included by none
📒 Files selected for processing (15)
  • .agents/skills/uloop-run-tests/SKILL.md
  • .claude/skills/uloop-run-tests/SKILL.md
  • Assets/Tests/Editor/DomainReloadDisableScopeTests.cs
  • Assets/Tests/Editor/RunTestsUseCaseTests.cs
  • Packages/src/Editor/FirstPartyTools/Common/EditorUtility/DomainReloadDisableScope.cs
  • Packages/src/Editor/FirstPartyTools/RunTests/RunTestsCancelStopRestore.cs
  • Packages/src/Editor/FirstPartyTools/RunTests/RunTestsExecutionTimeout.cs
  • Packages/src/Editor/FirstPartyTools/RunTests/RunTestsSchema.cs
  • Packages/src/Editor/FirstPartyTools/RunTests/RunTestsUseCase.cs
  • Packages/src/Editor/FirstPartyTools/RunTests/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/RunTests/TestFramework/PlayModeTestExecuter.cs
  • Packages/src/Editor/FirstPartyTools/RunTests/TestFramework/RunTestsCancelStopRestoreUnityHooks.cs
  • cli/common/tools/default-tools.json
  • tests/RunTestsExecutionTimeout.UnitTests/RunTestsCancelStopRestoreTests.cs
  • tests/RunTestsExecutionTimeout.UnitTests/RunTestsExecutionTimeoutTests.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/run-tests-hang-hardening

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hatayama

Copy link
Copy Markdown
Owner Author

LGTM on content (reviewer: Fable), conditional on the full CI pipeline going green. The branch is exactly the three individually reviewed PRs (#1739 timeout, #1740 cancel-time stop/restore, #1741 scope recovery hardening) with no extra changes, and no temporary hang fixtures leaked into the diff. No protocol version bump is needed: TimeoutSeconds is an additive schema field and the wire format stays compatible. Real-device freeze verification (intentional PlayMode hang → timeout → confirmed Play Mode exit → subsequent EditMode run green without restart) was performed before this PR.

@hatayama hatayama merged commit efa4898 into v3-beta Jul 13, 2026
10 checks passed
@hatayama hatayama deleted the feature/run-tests-hang-hardening branch July 13, 2026 06:21
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