fix(flow): 修复 finish 阶段分支合并的多个问题

1. 在 BranchManager 添加 _cleanup_lock_file 方法,清理 lock 文件
2. 将分支合并移到 git 提交之后执行
3. 在分支合并前再次提交状态文件(解决 save_status 更新 hash 后未提交的问题)

测试任务:创建 test-cache/hello.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-17 05:42:24 +08:00
parent be25738437
commit 5c236672c5
6 changed files with 115 additions and 10 deletions

75
.aide/flow-status.json Normal file
View File

@@ -0,0 +1,75 @@
{
"task_id": "2025-12-17T05-33-04",
"current_phase": "finish",
"current_step": 8,
"started_at": "2025-12-17T05:33:04+08:00",
"history": [
{
"timestamp": "2025-12-17T05:33:04+08:00",
"action": "start",
"phase": "task-optimize",
"step": 1,
"summary": "测试任务:写一个 hello 程序",
"git_commit": "356002d3d0377c11d3de2e3f16afd377c094d28a"
},
{
"timestamp": "2025-12-17T05:33:33+08:00",
"action": "next-part",
"phase": "flow-design",
"step": 2,
"summary": "简单任务,跳过任务优化",
"git_commit": "eb089ce02d848208f271cfa1d2c7cfe831c7c06f"
},
{
"timestamp": "2025-12-17T05:33:58+08:00",
"action": "next-part",
"phase": "impl",
"step": 3,
"summary": "简单任务,跳过流程设计",
"git_commit": "06f51ed01f04ea6cbc55b7c839a7d44582961603"
},
{
"timestamp": "2025-12-17T05:34:46+08:00",
"action": "next-step",
"phase": "impl",
"step": 4,
"summary": "创建 hello.py 程序",
"git_commit": "01ff16417784cb976d19ac81a43bc542bce6e61b"
},
{
"timestamp": "2025-12-17T05:35:00+08:00",
"action": "next-part",
"phase": "verify",
"step": 5,
"summary": "代码实现完成",
"git_commit": "e97781d75c2421ca6e8280bf57240b48e5599e0c"
},
{
"timestamp": "2025-12-17T05:35:37+08:00",
"action": "next-step",
"phase": "verify",
"step": 6,
"summary": "验证程序运行正常",
"git_commit": "bac4ce699628f581bc9ae5a3fa10ff32ccf38820"
},
{
"timestamp": "2025-12-17T05:35:51+08:00",
"action": "next-part",
"phase": "docs",
"step": 7,
"summary": "验证完成",
"git_commit": "4ac3aa186f33caf69bfe788537d5c473ffa019bf"
},
{
"timestamp": "2025-12-17T05:38:37+08:00",
"action": "next-part",
"phase": "finish",
"step": 8,
"summary": "测试任务完成,修复验证",
"git_commit": "7f59a660b1eafa4153ade83ceffe8075131ca32d"
}
],
"source_branch": "master",
"start_commit": "be2573843758e916d4da0b4c11ed04eaa4143dde",
"task_branch": "aide/002"
}