feat(FN-709): store branch name on tasks for reliable merge recovery

- Add 'branch' field to Task and ArchivedTaskEntry types with DB migration
- Executor stores branch name on task after worktree assignment
- Merger reads branch from task metadata instead of relying on worktree state
- Implement non-destructive conflict recovery in prepareForTask with reset/clean
- Add tests for branch storage, merger branch reading, and worktree recovery
This commit is contained in:
gsxdsm
2026-04-02 14:08:31 -07:00
parent 932a45a862
commit 321feb0b8d
10 changed files with 241 additions and 78 deletions

View File

@@ -557,7 +557,7 @@ export async function aiMergeTask(
);
}
const branch = `kb/${taskId.toLowerCase()}`;
const branch = task.branch || `kb/${taskId.toLowerCase()}`;
const worktreePath = task.worktree;
const result: MergeResult = {
task,