fix: Surface startup recovery failures when no server is restored#1553
Merged
Conversation
Capture the current SessionRecoveryService decision tree and the startup-protection gap before unifying startup restoration with reload recovery.
Delegate editor-startup restoration to the same recovery decision service used after domain reload while keeping the controller-owned background-process guard.
Update the startup recovery pin to match the shared session recovery validation now used by the controller.
Contributor
📝 WalkthroughWalkthroughThis PR introduces a ChangesSession recovery delegation
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant UnityCliLoopServerControllerService
participant SessionRecoveryService
Caller->>UnityCliLoopServerControllerService: RestoreServerStateIfNeeded()
UnityCliLoopServerControllerService->>SessionRecoveryService: RestoreServerStateIfNeededAsync()
SessionRecoveryService-->>UnityCliLoopServerControllerService: ValidationResult
alt result invalid
UnityCliLoopServerControllerService-->>Caller: throw InvalidOperationException(ErrorMessage)
else result valid
UnityCliLoopServerControllerService-->>Caller: recovery complete
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Add a Unity console error for startup restore failures and consolidate recovery test fakes so the new pins stay focused on one behavior each.
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User Impact
Changes
UnityEngine.Debug.LogErrorwhen startup restore faults, matching the tracked recovery path.Verification
dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)"-> 0 errors / 0 warningsdist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode EditMode --filter-type regex --filter-value "(DomainReloadRecoveryUseCaseTests|UnityCliLoopServerControllerRecoveryTests|UnityCliLoopServerControllerStartupLockTests|UnityCliLoopServerStartupProtectionTests|UnityCliLoopBridgeServerShutdownTests|JsonRpcHeartbeatTests|UnityCliLoopServerLifecycleRegistryServiceTests|ServerLifecycleContractTests|UnityCliLoopFirstPartyServerLifecycleBindingTests|JsonRpcProcessorCliVersionGateTests|OnionAssemblyDependencyTests)"-> 145/145 passed