fix: add empty output guard for OpenCode reviewer

Addresses review feedback — checks if opencode output file is
non-empty after invocation, writes a failure message if empty
to prevent blank sections in REVIEWS.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ngothanhluan
2026-04-03 06:56:50 +07:00
parent 2ff3853eab
commit 372c0356e5

View File

@@ -147,6 +147,9 @@ coderabbit review --prompt-only 2>/dev/null > /tmp/gsd-review-coderabbit-{phase}
**OpenCode (via GitHub Copilot):**
```bash
cat /tmp/gsd-review-prompt-{phase}.md | opencode run - 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md
if [ ! -s /tmp/gsd-review-opencode-{phase}.md ]; then
echo "OpenCode review failed or returned empty output." > /tmp/gsd-review-opencode-{phase}.md
fi
```
If a CLI fails, log the error and continue with remaining CLIs.