Skip to content

chore: Worktree-collision dispatch failures must not count toward the failure caps or set needs-manual-dispatch (residual of #339 part 2) - #903

Merged
getappz merged 3 commits into
masterfrom
task/362-worktree-collision-dispatch-failures-mus
Oct 14, 2026
Merged

getappz merged 3 commits into
masterfrom
task/362-worktree-collision-dispatch-failures-mus

Conversation

@getappz

@getappz getappz commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Collision failures ('is already used by worktree at') are neutral for both dispatch-failure caps; never gate needs-manual-dispatch. Hot-loop bound: no new cap; supervisor deferral re-checks branch ownership each tick so repeats are tick-paced. Owner routing left to #340. Item #352.


Opened by claude-code on i-flare-51bb8de6c33b (flared:51bb8de6c33b) for item #362 via agentflare.

Summary by CodeRabbit

  • Bug Fixes
    • Worktree branch collisions are now treated neutrally in dispatch-failure tracking. They neither increase a failure streak nor reset one, including when they occur between other failures.
    • Items affected by a worktree branch collision remain ungated by dispatch-failure caps, while existing cap calculations and restoration behavior remain unchanged.

…e caps and never gate the item

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Agentflare-Agent: claude-code
Agentflare-Branch: task/362-worktree-collision-dispatch-failures-mus
Agentflare-Item: 362
Agentflare-Session: f58fda58-1dee-4268-9978-cbc63dc496b1
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: getappz/agentflare/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 19e4b8a4-c73a-49cc-a977-20f79d4d90c9
📥 Commits

Reviewing files that changed from the base of the PR and between 09886f5 and cdbbec3.

📒 Files selected for processing (2)
  • crates/agentflare-bin-lib/src/dispatch_failure_ceiling.rs
  • src/dashboard/orphan_reconcile.rs

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📝 Walkthrough

Worktree branch collisions are now neutral outcomes for dispatch-failure counters. Orphan reconciliation logs when the latest recognized failure reason is a collision and leaves the item ungated.

Changes: Worktree collision handling

Layer / File(s) Summary
Classify collisions for failure caps
crates/agentflare-bin-lib/src/dispatch_failure_ceiling.rs
A predicate identifies worktree branch collisions in work-failure reasons. The neutral-outcome check excludes them from both failure streaks. Tests cover mixed and repeated collisions, including signatures in dispatch comments.
Log collisions during orphan reconciliation
src/dashboard/orphan_reconcile.rs
Orphan reconciliation logs when the latest recognized failure reason is a worktree branch collision. The existing cap calculation remains unchanged.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to cdbbe

Worktree collisions are excluded from dispatch-failure caps, and orphan reconciliation identifies the latest recognized collision. The supplied evidence indicates no actionable merge risk.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Description check Warning The description explains the collision behavior and scope, but it does not follow the repository template. It omits the Summary, Test plan, and Notes for reviewers sections, including test results and… Add the required template sections. Document the change under Summary, mark or report the cargo test, clippy, and fmt checks under Test plan, and provide risk areas and backwards-compatibility notes under Notes for reviewers.
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main change: worktree-collision failures do not count toward failure caps or set needs-manual-dispatch. The title is longer than necessary because it includes residual…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the collision behavior and scope, but it does not follow the repository template. It omits the Summary, Test plan, and Notes for reviewers sections, including test results and risk or compatibility notes.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…in orphan reconcile

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Agentflare-Agent: claude-code
Agentflare-Branch: task/362-worktree-collision-dispatch-failures-mus
Agentflare-Item: 362
Agentflare-Session: f58fda58-1dee-4268-9978-cbc63dc496b1
@getappz
getappz marked this pull request as ready for review October 13, 2026 14:17
@getappz
getappz merged commit 0ea770a into master Oct 14, 2026
18 checks passed
@getappz
getappz deleted the task/362-worktree-collision-dispatch-failures-mus branch October 14, 2026 05:28
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