fix(ci/issue-comment): make agent assertion non-fatal; fail only on proxy 5xx/upstream_error; keep fallback path working

This commit is contained in:
James Peter
2025-09-13 19:25:06 +10:00
parent b94e273140
commit 51479121b4
+2 -6
View File
@@ -326,15 +326,11 @@ jobs:
2>&1 | tee .github/auto/AGENT_OUT.txt
true
set -e
- name: Assert agent success (fail on streaming/server errors)
- name: Assert agent success (fail on server 5xx only; tolerate local stream errors)
if: ${{ secrets.OPENAI_API_KEY != '' }}
continue-on-error: true
run: |
set -euo pipefail
if rg -n "^\\[.*\\] ERROR: (stream error|server error|exceeded retry limit)" .github/auto/AGENT_OUT.txt >/dev/null 2>&1; then
echo "Agent reported a fatal error (stream/server). Failing job." >&2
rg -n "^\\[.*\\] ERROR: (stream error|server error|exceeded retry limit)" .github/auto/AGENT_OUT.txt || true
exit 1
fi
if [ -s .github/auto/openai-proxy.log ]; then
if rg -n '"phase":"response_head".*"status":5\\d\\d' .github/auto/openai-proxy.log >/dev/null 2>&1; then
echo "Proxy observed 5xx from upstream during agent run. Failing job." >&2