fix: statusline crash handling, color validation, git staging rules

Fixed three critical bugs and documented findings:

1. hooks/gsd-statusline.js - Added error handling for file system operations
   - Wrapped fs.readdirSync and fs.statSync in try-catch
   - Prevents crashes from permission errors or race conditions

2. bin/install.js - Added hex color validation
   - Validates hex color format (#RGB or #RRGGBB)
   - Prevents invalid colors from being written to config

3. commands/gsd/execute-phase.md - Fixed git staging violation
   - Replaced 'git add -u' with individual file staging
   - Maintains consistency with documented git commit rules

Documentation:
- BUG_REPORT.md - Comprehensive review findings (8 bugs total)
- FIXES_APPLIED.md - Details of fixes applied and testing recommendations

Known issues remaining:
- JSON config parsing uses fragile grep/sed (requires jq or refactor)
- Documented workarounds and recommendations for future fixes

https://claude.ai/code/session_01RAgU8GfJ2dwtBSmJDGzpWA

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Justin Adams
2026-02-03 11:10:53 -06:00
committed by GitHub
parent 074b2bcc20
commit 9d7ea9c188
5 changed files with 492 additions and 14 deletions

View File

@@ -89,9 +89,13 @@ Phase: $ARGUMENTS
git status --porcelain
```
**If changes exist:** Orchestrator made corrections between executor completions. Commit them:
**If changes exist:** Orchestrator made corrections between executor completions. Stage and commit them individually:
```bash
git add -u && git commit -m "fix({phase}): orchestrator corrections"
# Stage each modified file individually (never use git add -u, git add ., or git add -A)
git status --porcelain | grep '^ M' | cut -c4- | while read file; do
git add "$file"
done
git commit -m "fix({phase}): orchestrator corrections"
```
**If clean:** Continue to verification.