Skip to content

fix: align blockedBy IDs with task filenames#462

Open
ggttyy1 wants to merge 2 commits into
shareAI-lab:mainfrom
ggttyy1:fix/task-blockedby
Open

fix: align blockedBy IDs with task filenames#462
ggttyy1 wants to merge 2 commits into
shareAI-lab:mainfrom
ggttyy1:fix/task-blockedby

Conversation

@ggttyy1

@ggttyy1 ggttyy1 commented Jul 11, 2026

Copy link
Copy Markdown

问题: LLM 在调用 create_task 时,blockedBy 里填的是 task subject 而非 task ID(例如 "setup database schema" 而非
"task_1783745267_5084")。原 can_start 直接把 blockedBy 条目当文件名检查,导致这类依赖永远找不到,任务永远无法启动。

改动: 在 s12-s20 共 9 个文件中:

  1. 新增 _build_task_index() — 扫描 .tasks/ 目录,构建 {subject: task_id} 映射
  2. can_start() — 先建索引,用 idx.get(dep_ref) 解析引用,找不到返回 False
  3. claim_task() — 同样用索引解析,区分"未完成"和"不存在"两种情况报告

@ggttyy1 ggttyy1 closed this Jul 11, 2026
@ggttyy1 ggttyy1 reopened this Jul 11, 2026
@ggttyy1 ggttyy1 force-pushed the fix/task-blockedby branch from a842fea to 6868aa1 Compare July 11, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant