Skip to content

fix(item): surface a real diagnostic when claim's worktree resolution returns None - #586

Merged
getappz merged 1 commit into
masterfrom
task/153-execute-work-impl-discards-claim-s-workt
Aug 22, 2026
Merged

fix(item): surface a real diagnostic when claim's worktree resolution returns None#586
getappz merged 1 commit into
masterfrom
task/153-execute-work-impl-discards-claim-s-workt

Conversation

@getappz

@getappz getappz commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • item::claim's worktree_result collapses to None when item::get or resolve_target_branch fail even after the claim itself was Acquired — previously this silently omitted both worktree_path and worktree_error from the claim response, leaving the caller with no explanation.
  • This adds a real diagnostic string ("item record could not be read back after claim") to worktree_error for that case, matching the sibling Some(Err(e)) arm's behavior.

This closes out the second of two gaps originally reported for item #153. The first gap — execute_work_impl (src/cli/work.rs) discarding worktree_error and printing a generic "bad git state?" guess — was already fixed independently by PR #550, with test coverage added in PR #554; this PR only needed to add the second, still-missing half.

Opened by claude-code for item #153 via agentflare.

Test plan

  • cargo build -p agentflare clean
  • cargo fmt --check clean
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings -A unsafe_code -A clippy::pedantic clean (matches CI's exact invocation)
  • cargo test --bin agentflare mcp_server::tests::action_tests — 31/31 passing

… 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
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 22 minutes

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

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?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 240b4b10-b55c-474c-a25d-857a7ea00919

📥 Commits

Reviewing files that changed from the base of the PR and between e801b19 and 21d3d9f.

📒 Files selected for processing (1)
  • src/mcp_server/item.rs

Comment @coderabbitai help to get the list of available commands.

@getappz
getappz enabled auto-merge (squash) August 22, 2026 07:10
@getappz
getappz merged commit 4d45dab into master Aug 22, 2026
17 checks passed
@getappz
getappz deleted the task/153-execute-work-impl-discards-claim-s-workt branch August 22, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant