fix: parent traversal 应在 .git 边界停止 #168
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Bug
findWorkflowInParents(thread.ts)注释写了 "Stops at filesystem root or .git directory",但代码只检查了 filesystem root,没有.git边界检查。discoverProjectWorkflows(store.ts)的 parent traversal 同样没有。来源:PR #167 小墨 review nit。
为什么要停
.workflow/是 project-local 概念,不应穿透 git repo 根目录往上走。例如 monorepo 子目录跑uwf,找到 repo root 的.workflow/就该停,不该继续往~或/走。涉及
packages/cli/src/commands/thread.ts—findWorkflowInParents()L299 循环加.git检查packages/cli/src/store.ts—discoverProjectWorkflows()调用侧的 parent traversal 也需同步.git目录,验证不会穿透