tui: Deferred work pane is empty on a mixed v6/v7 install — deferred_entries and pending_missed_decisions don't resolve paths with want_tickets

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 src/bmad_loop/tui/data.py 中的 deferred_entries 和 pending_missed_decisions 开始,然后阅读 _project_paths 和 bmadconfig.load_paths,了解 want_tickets 如何选择路径。在 tests/test_tui_data.py 中添加一个使用混合 v6/v7 配置和 initiative 台账的回归用例;完成标准是两个函数都能找到 v7 台账,同时纯 v6 路径解析仍然有效。

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

描述

Summary

On a BMAD v7 project whose central config still carries the v6 keys [modules.bmm] planning_artifacts / implementation_artifacts (the installer writes them, so a migrated v6 → v7 project typically has them), the TUI's Deferred work pane shows "deferred ledger unavailable" even though the v7 ledger exists and parses. The ticket boards in the same TUI resolve the project as v7 correctly.

Seen on v0.13.2; the same code is on main at 8224d535e09a68c9ed5144e32e0842396acc646d.

Reproduce

  1. A v7 project with the ticket tree (_bmad/method/scripts/tickets.py present) and an active initiative whose folder holds deferred-work.md with DW entries.
  2. Central config still resolves the v6 keys planning_artifacts and implementation_artifacts (for example [modules.bmm] in _bmad/config.toml, or _bmad/bmm/config.yaml).
  3. bmad-loop tui → Deferred work.

Expected: the initiative's deferred-work.md entries, as bmad-loop sweep and tickets runs see them.
Actual: "deferred ledger unavailable". Calling data.deferred_entries(project) returns None; data._project_paths(project) resolves the v6 era with the ledger at <implementation_artifacts>/deferred-work.md, which no longer exists after the migration.

With want_tickets=True the same project resolves v7, the ledger path is <output_folder>/<active_initiative>/deferred-work.md, and parse_ledger returns every entry, so the ledger format is not the problem.

Cause

  • deferred_entries calls _project_paths(project) without want_tickets (tui/data.py#L1467).
  • pending_missed_decisions has the same call (tui/data.py#L1552).
  • bmadconfig.load_paths switches to v7 only when want_tickets is set or no v6 key resolves (bmadconfig.py#L676), so a mixed install answers v6 here.
  • The ticket boards already pass want_tickets=True (tui/data.py#L1324, #L1349), and _project_paths's docstring says that flag "resolves as a tickets run does, so a mixed install answers v7".

Possible fix

Resolve the ledger the way tickets runs and sweeps do on a v7 project: pass want_tickets=True at both call sites when the v7 marker is present (or always, if load_paths already falls back correctly on a pure v6 project). A test in tests/test_tui_data.py with a mixed config (v6 keys + v7 marker + initiative ledger) would pin it.

Workaround

Deleting the v6 keys isn't a good fix: the installer manages them, and v6 skills may still read them. Pointing implementation_artifacts at the active initiative's folder in a user override makes the pane read the right file, but it has to follow every initiative switch.

主要语言
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 摘要。