Skip to content

feat: report last observed compile status in COMPILE_WAIT_TIMEOUT - #2035

Merged
hatayama merged 3 commits into
feature/issue-2032-compile-waitfrom
feature/issue-2032-timeout-details
Jul 28, 2026
Merged

feat: report last observed compile status in COMPILE_WAIT_TIMEOUT#2035
hatayama merged 3 commits into
feature/issue-2032-compile-waitfrom
feature/issue-2032-timeout-details

Conversation

@hatayama

@hatayama hatayama commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • COMPILE_WAIT_TIMEOUT now includes the last observed compile status flags and how long the CLI waited.
  • UNITY_SERVER_BUSY while the running tool is compile explains that a caller's own prior timeout can reattach on retry.

User Impact

  • Before: a wait timeout only said the wait expired, with no signal whether Unity was still compiling/updating/reloading.
  • After: the error Details report IsCompiling / IsUpdating / IsDomainReloadInProgress and WaitedMs. Busy responses for a running compile tool also point to the reattach recovery path without promising it for unrelated unity-compile busy states.

Changes

  • waitForCompileCompletionWithDeps returns the last observed *compileStatusResponse (nil when none).
  • Timeout error Details follow the EditorActivity precedent on busy errors.
  • Busy NextActions add compile-reattach guidance only when runningToolName == "compile".
  • Shared release input stamps updated for the cli/common change.

Verification

  • scripts/check-go-cli.sh passed.
  • scripts/stamp-release-inputs.sh run and included.
  • E2E: dist/darwin-arm64/uloop compile --compile-wait-timeout-seconds 1 --force-recompile → Details {IsCompiling: true, WaitedMs: 1001, ...}.

Review in cubic

hatayama and others added 2 commits July 28, 2026 16:33
Include IsCompiling/IsUpdating/IsDomainReloadInProgress and WaitedMs in
the timeout error details so callers can see why the wait ended.

Co-authored-by: Cursor <cursoragent@cursor.com>
When the busy running tool is compile, guide callers that their own
prior COMPILE_WAIT_TIMEOUT can reattach on retry — not unity-compile.

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

coderabbitai Bot commented Jul 28, 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 Plus

Run ID: 990bd2ce-605e-47cf-8874-d546ceb0c35c

📥 Commits

Reviewing files that changed from the base of the PR and between ebe3330 and b45a3a3.

📒 Files selected for processing (10)
  • cli/common/errors/busy_editor_state.go
  • cli/common/errors/busy_editor_state_test.go
  • cli/dispatcher/shared-inputs-stamp.json
  • cli/project-runner/internal/projectrunner/compile_attach.go
  • cli/project-runner/internal/projectrunner/compile_attach_test.go
  • cli/project-runner/internal/projectrunner/compile_wait.go
  • cli/project-runner/internal/projectrunner/compile_wait_test.go
  • cli/project-runner/internal/projectrunner/execution_errors.go
  • cli/project-runner/internal/projectrunner/run.go
  • cli/project-runner/shared-inputs-stamp.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/issue-2032-timeout-details

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.

Unit coverage of compileWaitTimeoutDetails alone left the run.go /
compile_attach.go wiring untested; nil lastStatus or zero WaitedMs
would still pass the suite. Assert IsCompiling and WaitedMs on the
existing timeout stderr envelopes so those call sites stay wired.

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

Copy link
Copy Markdown
Owner Author

Addressed review feedback on test discriminating power:

  • Extended TestRunCompileWithDomainReloadWaitUsesConfiguredTimeout to assert stderr envelope Details.IsCompiling == true and Details.WaitedMs >= 1000 (covers run.go wiring of lastStatus / WaitedMs).
  • Extended TestRunCompileAttachRetimesOutPreservesPendingRecord the same way (covers compile_attach.go wiring).
  • Shared helper: assertCompileWaitTimeoutEnvelopeDetails.

scripts/check-go-cli.sh passed. Please re-review.

@hatayama
hatayama merged commit 5c1adf4 into feature/issue-2032-compile-wait Jul 28, 2026
2 checks passed
@hatayama
hatayama deleted the feature/issue-2032-timeout-details branch July 28, 2026 07:45
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