Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/claude-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,35 @@ jobs:
Remember: You're not here to write essays. You're here to make quick decisions and go back to sleep.

[>be me >eternally tired repo bouncer >why am i even awake]

# anthropics/claude-code-action reports success even when Claude's own
# result is an error. 2026-09-02 05:15: "is_error": true after 11 s,
# the shared OAuth token at its spending cap; the run went green and
# PR #1237 sat unreviewed with nothing to show for it. A review that
# did not happen is a failure, and below it pages like one, the same
# way the fetch workflow does.
- name: Fail if the review errored
if: steps.claude-review.outcome == 'success' && steps.claude-review.outputs.execution_file != ''
run: |
f="${{ steps.claude-review.outputs.execution_file }}"
if grep -Eq '"is_error":\s*true' "$f"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict the check to the final result event

When Claude encounters a recoverable tool error and then completes the review, the execution log still contains a tool-result block with is_error: true; the SDK documentation explicitly defines this flag for tool results (content/en/docs/claude-code/agent-sdk/todo-tracking.md:210-215), while the action documentation describes execution_file as the entire event log and locates the final outcome by selecting an entry whose type is result (content/github/claude-code-action/base-action/README.md:366-377). Grepping the whole file therefore makes such successful reviews exit 1 and send a false Bark page. Parse the final type == "result" event and test its is_error field instead.

Useful? React with 👍 / 👎.

echo "::error::Claude returned is_error=true; the review did not happen"
grep -Eo '"result":\s*"[^"]{0,300}' "$f" | tail -1 || true
exit 1
fi
echo "review completed (is_error absent)"

- name: Alert on failure
if: failure()
env:
BARK_SERVER: ${{ secrets.BARK_SERVER }}
BARK_DEVICES: ${{ secrets.BARK_DEVICES }}
run: |
[ -n "${BARK_SERVER:-}" ] && [ -n "${BARK_DEVICES:-}" ] || exit 0
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
IFS=',' read -ra DEVICES <<< "$BARK_DEVICES"
for dev in "${DEVICES[@]}"; do
jq -n --arg k "$dev" --arg u "$RUN_URL" \
'{device_key:$k, title:"🚨 docs review failed", body:"PR left unreviewed", url:$u, group:"Claude YOLO"}' \
| curl -sS -X POST "$BARK_SERVER/push" -H 'Content-Type: application/json' -d @- || true
done
Loading