Skip to content

chore: Remove redundant startup protection cleanup#1572

Merged
hatayama merged 1 commit into
v3-betafrom
chore/remove-duplicate-startup-protection-clear
Jul 6, 2026
Merged

chore: Remove redundant startup protection cleanup#1572
hatayama merged 1 commit into
v3-betafrom
chore/remove-duplicate-startup-protection-clear

Conversation

@hatayama

@hatayama hatayama commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove a duplicate startup-protection clear from the unexpected server-loop exit recovery path.

User Impact

  • No user-facing behavior changes are expected.
  • Recovery still clears startup protection before scheduling automatic recovery; the second identical clear was redundant.

Changes

  • Drop the second ClearStartupProtection call inside OnServerLoopUnexpectedlyExited.
  • Keep the existing tracked recovery scheduling and recovery behavior unchanged.

Verification

  • dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)" (0 errors, 0 warnings)
  • 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.UnityCliLoopServerControllerRecoveryTests" (15 passed)
  • 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.UnityCliLoopServerStartupProtectionTests" (4 passed)

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 42 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: c06ddcfb-bdf7-41dd-ada4-3c65523bcfa8

📥 Commits

Reviewing files that changed from the base of the PR and between aa07cc2 and f4ad4f9.

📒 Files selected for processing (1)
  • Packages/src/Editor/Infrastructure/Server/UnityCliLoopServerController.cs
📝 Walkthrough

Walkthrough

The unexpected server-loop-exit handler's main-thread recovery lambda now clears startup protection before proceeding, logs the exit warning with a transport=project_ipc tag, clears the bridge server reference, and schedules tracked recovery via StartRecoveryIfNeededAsync, along with added explanatory comments.

Changes

Server Loop Exit Recovery Update

Layer / File(s) Summary
Unexpected server-loop-exit recovery scheduling
Packages/src/Editor/Infrastructure/Server/UnityCliLoopServerController.cs
The delayCall recovery path clears startup protection, logs the warning with transport=project_ipc, nulls `_bridgeServer`, and schedules tracked recovery via `StartRecoveryIfNeededAsync(false, CancellationToken.None)`, with added inline comments.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • hatayama/unity-cli-loop#871: Both PRs update the unexpected server-loop-exit recovery path by clearing startup protection and scheduling StartRecoveryIfNeededAsync on the main thread.
  • hatayama/unity-cli-loop#1552: Both PRs modify OnServerLoopUnexpectedlyExited's startup-protection clearing and recovery scheduling logic.
  • hatayama/unity-cli-loop#1553: Both PRs adjust the controller's recovery flow triggered when the server loop exits unexpectedly.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the change to remove redundant startup protection cleanup.
Description check ✅ Passed The description matches the change and verification, describing the duplicate clear removal and recovery behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-duplicate-startup-protection-clear

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.

@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.

No issues found across 1 file

Re-trigger cubic

Drop the redundant ClearStartupProtection call from the unexpected server-loop exit path. Startup protection clearing is idempotent and the first call already opens recovery before scheduling the tracked recovery task.
@hatayama
hatayama force-pushed the chore/remove-duplicate-startup-protection-clear branch from aa07cc2 to f4ad4f9 Compare July 6, 2026 23:09
@hatayama
hatayama merged commit 9b07428 into v3-beta Jul 6, 2026
9 checks passed
@hatayama
hatayama deleted the chore/remove-duplicate-startup-protection-clear branch July 6, 2026 23:15
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