Repository navigation
test(work): cover execute_work_impl surfacing claim's worktree_error - #554
Conversation
Fix #550 landed the claim["worktree_error"] handling in execute_work_impl but shipped without a regression test at that call site. Add one that drives execute_work_impl end-to-end through a real claim against a non-git repo_root and asserts the posted comment carries the server's detail instead of falling back to the generic "(bad git state?)" message. Split into a sibling file (work.rs is frozen at the LOC gate's limit). Agentflare-Agent: claude-code Agentflare-Branch: task/154-execute-work-impl-worktree-error-test Agentflare-Item: 154
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 31 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 61 included PR reviews in the past 7 days; at that activity level, included reviews refill at 1 review per hour. 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)
Comment |
… returns None item::get failing to read the item back immediately after its own claim acquired it left worktree_error unset, so execute_work_impl (already fixed in #550/#554 to display worktree_error) had nothing to show and fell back to the generic "bad git state?" guess for this one case. resolve_target_branch is infallible, so this arm is only reachable via that item::get failure. Agentflare-Agent: claude-code Agentflare-Branch: task/153-execute-work-impl-discards-claim-s-workt Agentflare-Item: 153
… returns None (#586) item::get failing to read the item back immediately after its own claim acquired it left worktree_error unset, so execute_work_impl (already fixed in #550/#554 to display worktree_error) had nothing to show and fell back to the generic "bad git state?" guess for this one case. resolve_target_branch is infallible, so this arm is only reachable via that item::get failure. Agentflare-Agent: claude-code Agentflare-Branch: task/153-execute-work-impl-discards-claim-s-workt Agentflare-Item: 153 Co-authored-by: shiva <shiva@gosysinfo.tech>
Summary
claim["worktree_error"]detail-message handling inexecute_work_impl's missing-worktree branch, but shipped without a regression test at that call site.execute_work_implthrough a real claim against a non-gitrepo_root, forcing the server-side worktree provisioning failure, and asserts the posted comment carries the server'sworktree_errordetail rather than falling back to the generic"(bad git state?)"message.work_worktree_error_tests.rs+include!sincesrc/cli/work.rsis frozen at the LOC gate's limit.Test plan
cargo test execute_work_impl_posts_server_worktree_error_when_provisioning_fails— passescargo clippy --locked --workspace --all-targets --all-features -- -D warnings -A unsafe_code -A clippy::pedantic— cleanscripts/loc-gate.sh— passes