Repository navigation
fix: Worker compiler timeouts no longer block indefinitely - #1628
Conversation
Prevent compiler timeout recovery from blocking indefinitely when redirected streams remain open after process termination. Observe late stream faults and cover both bounded-drain outcomes without starting background work.
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a bounded drain mechanism for compiler stdout/stderr tasks used after killing a timed-out compiler process, introducing a termination timeout constant and two helper methods, plus new unit tests validating drain behavior for pending and completed tasks. ChangesCompiler stream drain handling
Estimated code review effort: 2 (Simple) | ~15 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
1 issue found across 2 files
You’re at about 93% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/DynamicCompilation/SharedRoslynCompilerWorkerAssemblyBuilder.cs">
<violation number="1" location="Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/DynamicCompilation/SharedRoslynCompilerWorkerAssemblyBuilder.cs:145">
P1: The bounded drain can still throw here when one of the redirected stream tasks faults before the 500 ms wait finishes. `Task.WaitAll(Task[], int)` throws `AggregateException` for completed faulted tasks, and the late-observation hook only runs after `WaitAll` returns `false`, so the timeout recovery path can still escape instead of returning `worker_compiler_timeout`.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Use a non-throwing bounded wait for the aggregate stream task so timeout recovery still returns its existing failure when redirected reads fault. Observe the aggregate fault and cover the regression directly.
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
You’re at about 93% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Observe each redirected read independently as well as the aggregate drain task so one late fault cannot remain hidden behind a peer stream that never completes.
Summary
User Impact
Changes
worker_compiler_timeoutresult.Verification
AggregateExceptionbefore the review fix.dist/darwin-arm64/uloop compile --project-path <PROJECT_ROOT>: 0 errors, 0 warningsSharedRoslynCompilerWorkerHostTests: 14 passedExternalCompilerPathResolverTests: 15 passedExternalCompilerMessageParserTests: 1 passedStaticFacadeStateGuardTests: 20 passedRefs: R2-31 in the Unity CLI Loop refactoring ToDo.