An executor must be able to rebase its own branch instead of dying in worktree prep #473
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
toasterson/Anima!473
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/wi-019fa7d9-an-executor-must-be-able-to-rebase-its-o"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Anima work item
019fa7d9-49ab-7ed2-816c-c17685c38173.POST-PHASING work item. The pre-phasing fix was done by hand on 2026-07-28 (see "Manual fix already applied" below); do NOT re-do that. This item is the durable capability, to be shaped by the ADR 0025-0031 phase-graph work.
Problem
When an agent branch cannot rebase onto its base,
worktree prepfails and the runner rejects the assignment:The server then re-dispatches on the next tick, which fails identically. Observed 2026-07-28: WI-234 (Akh-Medu) burned 20 sessions in 3 minutes before parking; WI-349 (Anima) failed 4 dispatches the same way. Each attempt consumes a slot, creates a session row, and produces no work. The failure is terminal for the item until a human intervenes, but nothing tells the human that — it looks like an ordinary retry loop.
Two distinct sub-cases, which today are indistinguishable:
Why this is post-phasing
The natural home for case 2 is a phase, not a retry: an item whose branch will not rebase should move to a rebase/conflict phase with its own prompt and its own exit bar, rather than sit in
workingre-dispatching. That only becomes expressible once the dynamic DB-defined phase graph lands (ADR 0025-0031, WI-393 dispatch branches on PhaseKind, WI-394 per-(item, phase) revisit cap). Building a bespoke retry-counter for this now would be another hand-rolled queue semantic of exactly the kind the RabbitMQ redesign is removing.Acceptance criteria
NNN_*.sqlmust be reported as a conflict even though git merges them cleanly (different filenames). See "Migration collision" below.Field evidence (2026-07-28)
Of 26 open Anima PRs, 11 could not rebase onto main. Separately, 10 different branches each added a different migration all numbered 067, and main had itself since added 067 and 068 — so every one of them would have broken on merge, and git reported none of them as conflicts.
Manual fix already applied (do not repeat)
This session rebased and force-pushed 12 branches and renumbered every colliding migration to a unique number (069-078): PRs 346, 350, 368, 373, 377, 378, 379, 381, 383, 386, 388, 389. Result: 23 of 26 open PR branches now merge cleanly.
Three were deliberately NOT rebased, and each needs a decision rather than a rebase:
mainnow has a strictly more completeSettingsService(project-scoped,GetSettings/SetSetting/ListSettingDefs,SettingDefregistry) versus the branch's user-scopedGetUserSettings/SetUserSetting.add/addconflicts onproto/anima/v1/settings.proto,services/settings.rs,repo/settings.rs. Porting them is re-implementation, not rebasing. Recommend closing both PRs and re-scoping the WIs against main's settings API.repeated ExecutorQuota executor_quotas = 5versus the branch'srepeated LaneStatus lane_status = 5. They are complementary halves (main measures account quota; the branch reacts to a sick lane) and want unifying, but choosing the field numbering and whetherLaneStatussubsumesAccountQuotais a design decision, not a merge.e060c58e10to95eadfe48cWIP: An executor must be able to rebase its own branch instead of dying in worktree prepto An executor must be able to rebase its own branch instead of dying in worktree prep