fix: wait for worktree start command launch#1012
Conversation
|
Warning Review limit reached
More reviews will be available in 38 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ 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.
Code Review
This pull request refactors the worktree start script execution to ensure that the start command has successfully spawned before the worktree creation or reset operation completes. This is achieved by introducing a Deferred signal to await the launch of the start scripts. Additionally, a unit test has been added to verify this behavior using a custom spawn probe. No review comments were provided, so there is no feedback to address.
Summary
Fixes the worktree start-command launch race exposed by the merged
windows-advisoryrun after PR #1004.createReady/resetcontinueWhy
The merged
devrun for commitf9219cce6f58c54fd8191d9b2385d5530c037fa4failed inwindows-advisoryon bothunit-windows-opencode-config-projectandunit-windows-opencode-server-tools.PR #1004 correctly moved long-running worktree start commands out of the foreground path, but it forked the whole start-script task. That left no handshake for the middle state: the command has started, but has not exited. Windows scheduling exposed both sides of that race: callers could continue before the command had spawned, and tests with short wall-clock waits could misclassify slow Windows setup as waiting on command exit.
Related Issue
No separate issue. Follow-up fix for the merged PR #1004 CI failure: https://github.com/Astro-Han/pawwork/actions/runs/26709693626
Human Review Status
Pending
Review Focus
Please focus on the
Worktreestart-script launch boundary:Deferred<void>barrier should wait only until the first configured start command spawnsRisk Notes
Platform/CI: this targets a Windows CI failure in worktree start-command timing. The final branch was verified with both normal PR CI and a manual
windows-advisorydispatch on the PR head.Visible UI check skipped: no visible UI or copy changed.
Docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, and local-only docs were not changed.
XHigh review: a read-only reviewer found no blocking issues and judged the fix clean/elegant at the lowest correct layer. I applied its optional cleanup to make the launch barrier
Deferred<void>because the barrier value is intentionally not consumed.How To Verify
Screenshots or Recordings
Not applicable. No visible UI changes.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.