docs: [vent] item(action=\"doctor\", reclaim=true, force=true) with no dry-run/previe… - #625
Conversation
**Done.** Default is now safe — unscoped `force=true` reclaim refused unless explicit intent. - `src/mcp_server/item_doctor.rs`: guard — `reclaim && force && worktree.is_none() && !repo_wide` → `Err(invalid_params)` before any deletion. - `src/mcp_server/types.rs`: new `repo_wide` field + updated `force`/`worktree` descriptions. - `src/mcp_server.rs`: `item` tool description updated. - `src/mcp_server/tests/item_doctor_tests.rs`: new regression test (refused unscoped force leaves lanes intact; `repo_wide=true` sweeps all). **Tests:** `cargo test item_doctor` → 4/4 pass (incl. new test); `cargo test mcp_server` → 247 passed, 0 failed. `cargo fmt --check` clean. Clippy: no new warnings in changed files. **Concerns:** - CLI `agentflare git doctor --force --reclaim` left unscoped — human-in-loop explicit flag, so deliberate. Could add same guard later if desired. - Didn't run full workspace test/clippy gate (heavy); change is localized to mcp_server. - Not committed (per rules — awaiting your go).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe change adds explicit ChangesForce-reclaim safety
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change narrows unsafe unscoped forced reclaim behavior and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Title checkExplanation The title identifies the affected item doctor operation and the unsafe unscoped force-reclaim scenario. It is related to the main change, although it is truncated and uses a documentation-oriented prefix for a behavior change. Full details: Description checkExplanation The description explains the change, motivation, implementation, regression coverage, test results, risks, and the limited validation scope. It does not follow the template headings or checkbox format exactly, but it provides the required information in substance.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Status:
Done. Default is now safe — unscoped
force=truereclaim refused unless explicit intent.src/mcp_server/item_doctor.rs: guard —reclaim && force && worktree.is_none() && !repo_wide→Err(invalid_params)before any deletion.src/mcp_server/types.rs: newrepo_widefield + updatedforce/worktreedescriptions.src/mcp_server.rs:itemtool description updated.src/mcp_server/tests/item_doctor_tests.rs: new regression test (refused unscoped force leaves lanes intact;repo_wide=truesweeps all).Tests:
cargo test item_doctor→ 4/4 pass (incl. new test);cargo test mcp_server→ 247 passed, 0 failed.cargo fmt --checkclean. Clippy: no new warnings in changed files.Concerns:
agentflare git doctor --force --reclaimleft unscoped — human-in-loop explicit flag, so deliberate. Could add same guard later if desired.Opened by
opencodeon flared:c997d745ae66 for item #480 via agentflare.Summary by CodeRabbit
New Features
Bug Fixes