Skip to content

fix: abandoned DomainReloadDisableScope state no longer blocks the next PlayMode test run#1741

Merged
hatayama merged 2 commits into
feature/run-tests-hang-hardeningfrom
feat/domain-reload-scope-abandon-hardening
Jul 13, 2026
Merged

fix: abandoned DomainReloadDisableScope state no longer blocks the next PlayMode test run#1741
hatayama merged 2 commits into
feature/run-tests-hang-hardeningfrom
feat/domain-reload-scope-abandon-hardening

Conversation

@hatayama

@hatayama hatayama commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Refs: hang survey section 2 / PR 1-3
Design: /tmp/claude-shared/pr-1-3-design.md

Summary

  • Abandoned or reload-leftover DomainReloadDisableScope state is cleared before the next PlayMode test run
  • Disposing a live scope after recovery no longer asserts or double-restores

User Impact

  • Before: inconsistent abandoned scope counts could leave domain reload disabled longer than intended or block clean recovery
  • After: the next run restores pending settings and starts from a clean scope count

Changes

  • RecoverAbandonedScopeBeforeNewRun always restores pending markers and clears non-zero counts (with or without a marker)
  • Dispose tolerates count already zeroed by Recover
  • EditMode tests for phantom-count, reload-like marker retention, and post-Recover Dispose

Verification

  • uloop compile green
  • uloop run-tests --filter-type regex --filter-value DomainReloadDisableScopeTests (10 passed)

Made with Cursor

Review in cubic

…reload

A non-zero scope count without a recovery marker could nest on a phantom scope,
and disposing a live instance after RecoverAbandoned asserted. Always clear
abandoned counts, restore pending markers before the next run, and make Dispose
tolerant of prior recovery.

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: 6 minutes

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: 7979cf73-6ad7-4479-b92b-6e6f73983306

📥 Commits

Reviewing files that changed from the base of the PR and between e6fb0c9 and d6a94e9.

📒 Files selected for processing (2)
  • Assets/Tests/Editor/DomainReloadDisableScopeTests.cs
  • Packages/src/Editor/FirstPartyTools/Common/EditorUtility/DomainReloadDisableScope.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/domain-reload-scope-abandon-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.

…tion counter

A delayed Dispose after Recover could still decrement once a newer scope had
reclaimed the count and restore settings mid-run. Bump a generation on recover
so stale instances no-op on Dispose while current-generation asserts stay intact.

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

Copy link
Copy Markdown
Owner Author

LGTM (reviewer: Fable). Generation-counter fix verified: Recover bumps the generation only when it clears a positive count, stale instances no-op on Dispose instead of stealing the newer scope's count, and the assert is scoped to generation-matching instances. The regression test (Dispose_OfAbandonedInstance_AfterNewScopeStarted_ShouldLeaveNewScopeIntact) covers exactly the delayed-finally scenario. Recover's always-restore + unconditional count clear and the reload-boundary test also match the agreed design.

@hatayama hatayama merged commit 642bf13 into feature/run-tests-hang-hardening Jul 13, 2026
2 checks passed
@hatayama hatayama deleted the feat/domain-reload-scope-abandon-hardening branch July 13, 2026 06:10
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