render_report: severities are case-sensitive and unknown values silently become 'low' ('Critical' renders as Low, critical count 0)
まだ誰も着手していません。
評価
調査の方向性
まず scripts/render_report.py と assets/report-shell.html から始めます。issue で重大度の処理が指摘されているため、続いて validate() が grade をどのようにチェックするかを追います。重大度の検証と両方のレポート出力を対象とする既存のテストがあるか確認します。大文字と小文字が混在する既知の重大度が一貫して正規化され、未知の値で明確な検証エラーが発生し、再現した件数とグループ分けが正しい状態になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
scripts/render_report.py and assets/report-shell.html are identical in both builders. Neither validates finding.severity. Any value other than exactly critical|high|medium|low is silently mapped to low: by severity_counts() for the CLI summary and markdown, and by the shell's normalize() for the HTML. The findings JSON is written by LLM lenses, so "Critical", "HIGH" or "major" are realistic. The report then shows a critical problem as Low and reports 0 critical.
grade, by contrast, is validated strictly and case-sensitively ("Poor" is rejected), so the two fields are inconsistent.
Steps to reproduce
cat > f.json <<'EOF'
{"subject":"demo-skill","grade":"poor","findings":[
{"id":"F1","lens":"security","severity":"Critical","title":"Deletes live config"},
{"id":"F2","lens":"structure","severity":"HIGH","title":"Missing activation"},
{"id":"F3","lens":"style","severity":"low","title":"Wordy"}]}
EOF
cd skills/bmad-workflow-builder
python3 scripts/render_report.py f.json --shell assets/report-shell.html -o r.html --md r.md
# {"counts": {"critical": 0, "high": 0, "medium": 0, "low": 3}, ...}
# r.md: "| Critical | 0 |"; F1/F2 listed under Low; r.html groups all three under Low
Expected behavior
Normalize case (severity.strip().lower()) in both Python and the shell, and reject anything still unknown in validate() with a clear error, the same way grade is handled. Never default an unknown severity to the lowest bucket.
Environment
- Model(s) used: n/a (deterministic script)
- Agentic IDE used: n/a (scripts run directly)
- BMad version: bmad-builder
main@d4a921c(v2.2.2 + #118) - Project language: Python 3.13, Linux
- 主要言語
- Python
- スター
- 220
- フォーク
- 54
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bmad-code-org/bmad-builder のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bmad-code-org/bmad-builder#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bmad-code-org/bmad-builder#153 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
bmad-code-org/bmad-builder#127 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
bmad-code-org/bmad-builder#123 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
bmad-code-org/bmad-builder#121 ·
bmad-code-org/bmad-builder の issue をすべて見る
似ている issue
-
namespace
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
EclipseFdn/open-vsx.org#15604 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: low status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
netbox-community/netbox-scripts#164 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 5 日以内に返信
-
Public function to read participants.tsv対応中かも @bruAristimunha が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
huggingface/tau#799 ·
メンテナーはふだん 2 日以内に返信