Repository navigation
Conversation
ensure_on_path prepends ~/.agentflare/shims to the user's persistent PATH. git_binary()'s exclusion filter only excluded this process's own dir and cargo target dirs, so agentflare's own worktree creation (create_worktree, called from the item claim flow) resolved git back to its own PATH shim -- which denies 'worktree' unconditionally, and the denial looked like an ordinary git error to the soft-fail-on-error caller, silently deadlocking the claim flow. Also ports mise's paths_eq comparator (case-insensitive, separator- normalized) instead of raw PathBuf equality, since a case or / vs mismatch on Windows/macOS would silently reintroduce the same bug. Agentflare-Agent: claude-code_2-1-217_agent Agentflare-Branch: feat/worktree-audit-294
…shot (#294) agentflare git audit preview: lists .worktrees/task/* dirs with a broken .git gitdir pointer, excluding any directory whose name matches a live claimed item's sequence_id. agentflare git audit prune [names...|--all]: removes the listed orphans, snapshotting each one first (same pre-destructive-snapshot rationale as reset --hard/clean -f), then runs 'git worktree prune' to clear git's own metadata. Automates the manual cleanup done in the 2026-07-21 branch/worktree sweep (37 branches -> 13 kept, .worktrees/ 942MB -> 316KB). Agentflare-Agent: claude-code_2-1-217_agent Agentflare-Branch: feat/worktree-audit-294
…or cases The combined test hand-built a backslash Windows path and asserted it matches on macOS too, but macOS never treats '\' as a separator -- Path::components() splits the two inputs differently there, so the assertion was wrong for that platform, not the paths_eq logic. CI caught it on build (macos-latest). Agentflare-Agent: claude-code_2-1-217_agent Agentflare-Branch: feat/worktree-audit-294
- audit_orphans: filter_map instead of collect::<Result<Vec<_>,_>>() -- one unreadable subdirectory no longer aborts the whole scan and silently reports 'no orphans found'. - gc_orphans: abort deletion of an orphan if its pre-delete snapshot fails, instead of discarding the error and deleting anyway with no recovery point. - claimed_sequence_ids/resolve_repo_root: fix a doc comment that ended up describing the wrong function after an earlier insertion. Agentflare-Agent: claude-code_2-1-217_agent Agentflare-Branch: feat/worktree-audit-294
gc_orphans: retry remove_dir_all with exponential backoff, fall back to cmd /c rmdir, detect locking process via handle64.exe. cleanup-branches.sh: retry git worktree remove on Permission denied with backoff; distinguish dirty vs locked; warn and fall through on lock so branch cleanup is not blocked. Item #302: git worktree remove --force .worktrees/ fails with Permission denied on Windows when rust-analyzer holds file handles. Agentflare-Agent: 1 Agentflare-Branch: feat/worktree-audit-294
|
Warning Review limit reached
Next review available in: 24 minutes 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 Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
✨ 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 |
|
Superseded by #308. This branch ( Cherry-picked the one genuinely new commit (the retry/backoff/handle64.exe worktree-removal logic) cleanly onto current master in #308, along with two fixes found in review: a fmt violation that would have failed CI, and test coverage (there was none) for the new retry logic. Closing this one in favor of #308. (Note: my first attempt at this comment got mangled — backticked code spans were eaten by shell command substitution. This edit fixes that.) |
…nding: partial worktree deletion on removal failure and branch mismatch. Review issues remain: partial worktree deletion on permission failure; fixture fix 2749048 is on task/308 rather than the named PR branch. Commit 082215e skips checked-out worktrees and preserves loose-branch cleanup; focused test, Bash syntax, and diff checks passed. Review of scope and branch mismatch pending. Partial deletion path addressed and focused test passed. Commits 2749048 and 082215e remain on task/308; feat/worktree-audit-294 is absent locally. Safety fix 082215e passed the focused test. PR #306 is closed; feat/worktree-audit-294 is absent locally and remotely. Await corrected PR or branch target. Safety fix 082215e and focused test passed on task/308. PR #306 is closed; feat/worktree-audit-294 is absent locally and remotely. Await corrected target. Code fix 082215e is committed and the focused test passes. Stop retrying this task until a corrected PR or branch target is supplied. Stop fix and review rounds. Tested fix 082215e is on task/308; a corrected PR or branch target is required. Park PR-target mismatch pending a corrected target. Fix 082215e remains committed and tested on the claimed task/308 branch. Skip stale PR #306 task. Preserve tested commits 2749048 and 082215e on task/308 for a correctly targeted follow-up. Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308
…dow log, argv-error cooldown (#308) (#870) * wip(sdd-loop): task 0 checkpoint Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 * docs+fmt: document failover metadata/config keys, fix cargo fmt drift Adds an "Automatic failover" section to the `agentflare work` CLI docs covering the `"failover"`/`"allowed_agents"` item-metadata keys and the `[failover]` config.toml table (usage_threshold_percent, five_hour_percent, seven_day_percent), per item #308's acceptance criteria. Also runs `cargo fmt` to clean up formatting drift left in the prior checkpoint. Agentflare-Agent: claude-code Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 Agentflare-Session: 31ba6896-9f51-43f4-9062-92c8e073cfc6 * fix: preserve branches when worktree cleanup fails Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 Agentflare-Session: bb396fc0-d442-4982-b50b-b58e444833e4 * test: create cleanup fixture worktree from HEAD Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 * Review completed; fixture fix 2749048 and shell checks passed. Outstanding: partial worktree deletion on removal failure and branch mismatch. Review issues remain: partial worktree deletion on permission failure; fixture fix 2749048 is on task/308 rather than the named PR branch. Commit 082215e skips checked-out worktrees and preserves loose-branch cleanup; focused test, Bash syntax, and diff checks passed. Review of scope and branch mismatch pending. Partial deletion path addressed and focused test passed. Commits 2749048 and 082215e remain on task/308; feat/worktree-audit-294 is absent locally. Safety fix 082215e passed the focused test. PR #306 is closed; feat/worktree-audit-294 is absent locally and remotely. Await corrected PR or branch target. Safety fix 082215e and focused test passed on task/308. PR #306 is closed; feat/worktree-audit-294 is absent locally and remotely. Await corrected target. Code fix 082215e is committed and the focused test passes. Stop retrying this task until a corrected PR or branch target is supplied. Stop fix and review rounds. Tested fix 082215e is on task/308; a corrected PR or branch target is required. Park PR-target mismatch pending a corrected target. Fix 082215e remains committed and tested on the claimed task/308 branch. Skip stale PR #306 task. Preserve tested commits 2749048 and 082215e on task/308 for a correctly targeted follow-up. Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 * fix(failover): validate thresholds and narrow argv failures --------- Co-authored-by: shiva <shiva@gosysinfo.tech>
… report review_result (#882) * wip(sdd-loop): task 0 checkpoint Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 * docs+fmt: document failover metadata/config keys, fix cargo fmt drift Adds an "Automatic failover" section to the `agentflare work` CLI docs covering the `"failover"`/`"allowed_agents"` item-metadata keys and the `[failover]` config.toml table (usage_threshold_percent, five_hour_percent, seven_day_percent), per item #308's acceptance criteria. Also runs `cargo fmt` to clean up formatting drift left in the prior checkpoint. Agentflare-Agent: claude-code Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 Agentflare-Session: 31ba6896-9f51-43f4-9062-92c8e073cfc6 * fix: preserve branches when worktree cleanup fails Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 Agentflare-Session: bb396fc0-d442-4982-b50b-b58e444833e4 * test: create cleanup fixture worktree from HEAD Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 * Review completed; fixture fix 2749048 and shell checks passed. Outstanding: partial worktree deletion on removal failure and branch mismatch. Review issues remain: partial worktree deletion on permission failure; fixture fix 2749048 is on task/308 rather than the named PR branch. Commit 082215e skips checked-out worktrees and preserves loose-branch cleanup; focused test, Bash syntax, and diff checks passed. Review of scope and branch mismatch pending. Partial deletion path addressed and focused test passed. Commits 2749048 and 082215e remain on task/308; feat/worktree-audit-294 is absent locally. Safety fix 082215e passed the focused test. PR #306 is closed; feat/worktree-audit-294 is absent locally and remotely. Await corrected PR or branch target. Safety fix 082215e and focused test passed on task/308. PR #306 is closed; feat/worktree-audit-294 is absent locally and remotely. Await corrected target. Code fix 082215e is committed and the focused test passes. Stop retrying this task until a corrected PR or branch target is supplied. Stop fix and review rounds. Tested fix 082215e is on task/308; a corrected PR or branch target is required. Park PR-target mismatch pending a corrected target. Fix 082215e remains committed and tested on the claimed task/308 branch. Skip stale PR #306 task. Preserve tested commits 2749048 and 082215e on task/308 for a correctly targeted follow-up. Agentflare-Branch: task/308-usage-threshold-failover-treats-70-weekl Agentflare-Item: 308 * fix(failover): validate thresholds and narrow argv failures --------- Co-authored-by: shiva <shiva@gosysinfo.tech>
Problem
\git worktree remove --force .worktrees/\ fails with Permission denied on Windows when rust-analyzer holds file handles. Blocks orphan GC and branch cleanup.
Changes
emove_worktree_dir\ helper in \gc_orphans: retries with exponential backoff, falls back to \cmd /c rmdir\ on Windows, detects locking process via handle64.exe