Skip to content

Commit 209ceb2

Browse files
Fix double review output in CI logs (#71)
## Summary - **extract-review-risk.sh**: Replace `tee` with redirect-then-cat to prevent duplicate review output in CI logs - **CLAUDE.md**: Add agent guideline to always check PR state before pushing ## Test plan - [ ] Verify LLM review appears once (not twice) in CI plan job logs
1 parent dbddf9f commit 209ceb2

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,4 @@ When working on any task:
299299
4. Never push without the user's confirmation
300300
5. Never implement hacky solutions — generalize
301301
6. Update task status in this file when complete
302+
7. **Always check PR state before pushing to a branch** — run `gh pr view` to verify the PR is still open. The user may have already merged it. Pushing to a merged branch creates orphaned commits.

scripts/extract-review-risk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ set -e
1111
REVIEW_SCRIPT="$1"
1212
PLAN_FILE="$2"
1313

14-
python3 "$REVIEW_SCRIPT" "$PLAN_FILE" 2>&1 | tee review-output.txt || true
14+
python3 "$REVIEW_SCRIPT" "$PLAN_FILE" > review-output.txt 2>&1 || true
15+
cat review-output.txt
1516

1617
if [ -f review-result.json ]; then
1718
RISK=$(jq -r '.risk // "FAILED"' review-result.json)

0 commit comments

Comments
 (0)