confirm: spec not found for parked stories when the project is nested under repo_root (path prefix duplicated)

未关闭 适合新手
#1,063 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
cli

调研方向

从 operatoractions._spec_path 开始,它会调用 verify.resolve_spec_path(spec_file, paths);阅读该 resolver 以查看探测顺序:先 paths.project,然后是 paths.implementation_artifacts 回退,不尝试 paths.repo_root。按所述用嵌套项目布局复现,以便看到重复的前缀出现,然后决定是在回退前探测 paths.repo_root / p,还是在创建 park 记录时相对于 paths.project 写入 spec_file。完成意味着位于 repo_root 子文件夹下的已 park 的 story 在 bmad-loop confirm --list 中显示为可确认并确认,外加一个覆盖 repo_root != project 的测试。

由索引模型根据 Issue 内容生成。

描述

Summary

When the BMAD project lives in a subfolder of the git repo (repo_root set in _bmad/custom/config.toml), a story parked at awaiting-operator can never be confirmed. bmad-loop confirm --list marks it NOT CONFIRMABLE: its spec is missing or unreadable, and the path it reports contains the project prefix twice.

Environment

  • bmad-loop 0.13.2 (installed with uv from git, commit 8224d535e09a68c9ed5144e32e0842396acc646d)
  • Linux, Python 3.14
  • source = "tickets", isolation = "worktree"
  • Project layout: <repo>/sub/dir/Project/, with repo_root = "{project-root}/../../.." in _bmad/custom/config.toml

Steps to reproduce

  1. Run a story in the nested project until it parks at awaiting-operator.
  2. The park record .bmad-loop/operator/<key>.json stores spec_file relative to the repo root:
    "spec_file": "sub/dir/Project/_bmad-output/initiative-x/tickets/<epic>/tickets/<story>-plan.md"
  3. From the project folder, run bmad-loop confirm --list or bmad-loop confirm <key> --yes.

Actual

<key> ... NOT CONFIRMABLE: its spec is missing or unreadable (<repo>/sub/dir/Project/_bmad-output/initiative-x/sub/dir/Project/_bmad-output/initiative-x/tickets/<epic>/tickets/<story>-plan.md)
error: refusing to confirm <key>: its spec is missing or unreadable (...same path...). The park entry disagrees with the committed state; `bmad-loop validate` reports the same drift. Nothing was changed.

The spec file does exist, at <repo>/sub/dir/Project/_bmad-output/initiative-x/tickets/<epic>/tickets/<story>-plan.md.

Expected

confirm finds the spec and completes the story.

Likely cause

operatoractions._spec_path calls verify.resolve_spec_path(spec_file, paths). That function probes a relative path against paths.project and then falls back to paths.implementation_artifacts. It never tries paths.repo_root. The park record, however, is written with a path relative to the repo root. When repo_root != project, neither probe hits the file. The fallback then glues the repo-relative path under implementation_artifacts, which explains the doubled prefix.

Possible fixes:

  • write spec_file relative to paths.project (or absolute) in the park record; or
  • have resolve_spec_path also probe paths.repo_root / p before the implementation_artifacts fallback.

Workaround we use

We hand-edit the story plan front matter (status: built, drop blocked_at / blocked_reason) so that dependent stories can start. This bypasses the per-action confirmation that confirm is meant to enforce.

主要语言
Python
星标
196
派生
78
平均合并
9 小时 24 分钟
30 天内合并 PR
44

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bmad-code-org/bmad-loop 的其他 Issue

查看 bmad-code-org/bmad-loop 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。