Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

fix(knowledge): list-promotion-candidates prints a stack trace on a malformed claim inventory

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

维护者通常 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 内容生成。

描述

good first issue needs-triage priority: low

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

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 模板
  • 阅读贡献指南

从这里开始

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

melodic-software/claude-code-plugins 的其他 Issue

查看 melodic-software/claude-code-plugins 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

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