fix(knowledge): list-promotion-candidates prints a stack trace on a malformed claim inventory
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, nodejs
- 领域
- cli
调研方向
从 plugins/knowledge/skills/video-digest/extraction/watch/ 下的 list-promotion-candidates.js 开始:零会话时抛出错误的代码大约在第 45-48 行,CLI 代码块大约在第 114-121 行,且没有 catch。请复制同目录下 vision-gated-promote.js(第 93-107 行)的错误处理:它将消息写入 stderr 并以退出码 1 退出。完成的标准是:格式错误的 inventory 只输出包含格式提示的一行消息,并以非零退出码结束,同时有一个 CLI 测试检查这两点。
由索引模型根据 Issue 内容生成。
描述
Summary
Run as a CLI, list-promotion-candidates.js calls listPromotionCandidates with no error handling, so its documented failure (no session parsed from research/claim-inventory.md) and any missing-file error escape as an uncaught exception with a Node stack trace. The sibling vision-gated-promote.js catches, prints the message to stderr and exits 1.
Failure scenario
Expected: a malformed claim inventory prints the one-line message with the format hint to stderr and exits with a nonzero code, with no stack trace.
Actual: the function throws at the zero-sessions check, and the CLI block does not catch it, so Node prints the stack trace. The useful part (SESSION_FORMAT_HINT) is buried under it.
Evidence
- The throw: https://github.com/melodic-software/claude-code-plugins/blob/7787be41e98e30cd6e3b82e99494886d77e30895/plugins/knowledge/skills/video-digest/extraction/watch/list-promotion-candidates.js#L45-L48
- CLI block with no catch: https://github.com/melodic-software/claude-code-plugins/blob/7787be41e98e30cd6e3b82e99494886d77e30895/plugins/knowledge/skills/video-digest/extraction/watch/list-promotion-candidates.js#L114-L121
- The sibling's pattern to match: https://github.com/melodic-software/claude-code-plugins/blob/7787be41e98e30cd6e3b82e99494886d77e30895/plugins/knowledge/skills/video-digest/extraction/watch/vision-gated-promote.js#L93-L107
Suggested fix
Wrap the call in try/catch, write error.message with writeStderr, and process.exit(1), as vision-gated-promote.js does. Add a CLI test with a claim inventory that parses to zero sessions asserting a one-line stderr and a nonzero exit.
Related
- #6813 (session-coverage gates and a zero-session inventory)
🤖 Generated with Claude Code
- 主要语言
- Shell
- 星标
- 22
- 派生
- 2
- 平均合并
- 8 小时 27 分钟
- 30 天内合并 PR
- 957
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
melodic-software/claude-code-plugins 的其他 Issue
-
priority: medium
难度 2/5 1-3 小时 新手友好度 68/100
melodic-software/claude-code-plugins#7351 · 2 条评论 ·
维护者通常 1 天内回复
-
agent-ready priority: high work-class: scoped
难度 2/5 1-3 小时 新手友好度 74/100
melodic-software/claude-code-plugins#7312 · 3 条评论 ·
维护者通常 1 天内回复
-
priority: medium
难度 2/5 1-3 小时 新手友好度 76/100
melodic-software/claude-code-plugins#7288 · 2 条评论 ·
维护者通常 1 天内回复
-
knowledge: docpage-digest dual verification defines no verdict vocabulary or pass/fail threshold未关闭needs-human
难度 2/5 1-3 小时 新手友好度 78/100
melodic-software/claude-code-plugins#7286 · 2 条评论 ·
维护者通常 1 天内回复
-
priority: low
难度 2/5 1-3 小时 新手友好度 76/100
melodic-software/claude-code-plugins#7282 · 2 条评论 ·
维护者通常 1 天内回复
查看 melodic-software/claude-code-plugins 的全部 Issue
相似的 Issue
-
netbox status: backlog topic: testing type: housekeeping
难度 2/5 1-3 小时 新手友好度 70/100
netbox-community/netbox#23395 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ajeetdsouza/zoxide#1323 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4391 · 1 条评论 ·
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 72/100
pbakaus/impeccable#1028 ·
维护者通常 1 天内回复