fix: Compile commands now finish reliably after Unity reloads scripts

Merged
HA
5mo ago
+2457-1362

Summary

  • Compile now waits on Unity status instead of a result file, so the command can return after script reload recovery.
  • Full recompiles now return a clear no-details result when Unity cannot provide error or warning lists.

User Impact

  • Before, compile could stall or lose its result when the Editor reloaded scripts or when a later compile overwrote stored state.
  • Now each compile request is tracked independently and the CLI polls until Unity is ready, making repeated compile calls more predictable.
  • When Unity cannot provide detailed output for a full recompile, users get a consistent response that points them to logs.

Changes

  • Store compile results and pending recovery state in Editor SessionState keyed by request id.
  • Replace file-based result polling with an internal compile status bridge and request-id scoped recovery.
  • Add diagnostic Vibe logs around compile waits, Domain Reload transitions, and compile lifecycle snapshots.
  • Bump the CLI contract and minimum version to 3.0.0-beta.22, then regenerate checked-in CLI binaries.
  • Update focused Unity and Go tests for normal compile, force compile, status polling, reload recovery, and per-request state.

Verification

  • Focused EditMode tests passed: 83/83.
  • Checked normal compile with Packages/src/Cli~/dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)".
  • Checked force compile with the checked-in development binary and confirmed the expected no-details result shape.
  • Confirmed Unity error logs were empty with get-logs --log-type Error --max-count 20.
  • scripts/check-go-cli.sh
  • git diff --check
  • /Users/a12115/dotfiles/.claude/skills/codex-review/scripts/codex-review v3-beta