fix: address review findings on forensics PR #1305

1. Resolve read-only contradiction: critical_rules now explicitly allows
   STATE.md session tracking alongside the forensic report write
2. Add label existence check before gh issue create --label "bug" to
   handle repos without a "bug" label gracefully

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-03-21 18:21:41 -04:00
parent 319f4bd6de
commit ee219e7726
2 changed files with 9 additions and 2 deletions

View File

@@ -243,9 +243,16 @@ If actionable anomalies were found (HIGH or MEDIUM confidence):
If confirmed:
```bash
# Check if "bug" label exists before using it
BUG_LABEL=$(gh label list --search "bug" --json name -q '.[0].name' 2>/dev/null)
LABEL_FLAG=""
if [ -n "$BUG_LABEL" ]; then
LABEL_FLAG="--label bug"
fi
gh issue create \
--title "bug: {concise description from anomaly}" \
--label "bug" \
$LABEL_FLAG \
--body "{formatted findings from report}"
```