You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 25, 2026. It is now read-only.
render_report: severities are case-sensitive and unknown values silently become 'low' ('Critical' renders as Low, critical count 0) #151
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.
Activity