Skip to content

feat: surface flare doctor --reclaim as an MCP action - #487

Merged
getappz merged 1 commit into
masterfrom
task/465-surface-flare-doctor-reclaim-via-mcp-wor
Aug 14, 2026
Merged

feat: surface flare doctor --reclaim as an MCP action#487
getappz merged 1 commit into
masterfrom
task/465-surface-flare-doctor-reclaim-via-mcp-wor

Conversation

@getappz

@getappz getappz commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Adds item(action="doctor") as an MCP-exposed wrapper around the existing flare doctor/doctor::scan+reclaim (item #235), so agents working purely through MCP tools have a discoverable path to worktree cleanup instead of hitting a dead end.

Also updates the git worktree remove/prune shim-denial message (crates/flare-git-core/src/classify.rs) to mention item(action="doctor", reclaim=true) alongside the existing check_merge/agentflare git worktree audit --prune guidance.

New tests: src/mcp_server/tests/item_doctor_tests.rs — scan-only (no reclaim by default) and reclaim-deletes-a-stale-clean-linked-worktree.

Verified: cargo fmt --check, cargo clippy -p agentflare -p flare-git-core --all-targets -- -A unsafe_code -A clippy::pedantic -D warnings, full flare-git-core (174 tests) and agentflare mcp_server (223 tests) suites all pass.

Closes agentflare item #465. (Original automated PR creation failed with a GitHub 422 "body too long" — the agent's raw session reply was used as the body instead of a trimmed summary; opened manually with a short body instead.)

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 52 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

Run ID: 20e7a763-404d-4d39-a4d9-a38c44348832

📥 Commits

Reviewing files that changed from the base of the PR and between 18b6fe9 and 8d494af.

📒 Files selected for processing (7)
  • crates/flare-git-core/src/classify.rs
  • src/mcp_server.rs
  • src/mcp_server/builtin_tools.rs
  • src/mcp_server/item_doctor.rs
  • src/mcp_server/tests/item_doctor_tests.rs
  • src/mcp_server/tests/mod.rs
  • src/mcp_server/types.rs

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

@getappz
getappz enabled auto-merge (squash) August 13, 2026 13:53
…ctor)

Adds a doctor action to the item MCP tool wrapping flare_git_core::doctor::scan/reclaim
(item #235's CLI-only worktree hygiene scan/reclaim) so an MCP-only agent that hits the
git worktree remove/prune shim denial has a discoverable path to worktree cleanup instead
of a dead end. Also cross-references the new action from the shim's teardown-deny message
and the item tool's own description.

Agentflare-Agent: claude-code
Agentflare-Branch: task/465-surface-flare-doctor-reclaim-via-mcp-wor
Agentflare-Item: 465
@getappz
getappz force-pushed the task/465-surface-flare-doctor-reclaim-via-mcp-wor branch from 8f33145 to 8d494af Compare August 14, 2026 07:32
@getappz
getappz merged commit dff772e into master Aug 14, 2026
16 checks passed
@getappz
getappz deleted the task/465-surface-flare-doctor-reclaim-via-mcp-wor branch August 14, 2026 07:42
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