From 2aa80ffe9a08df6b700deefd8b47e948e3971a1b Mon Sep 17 00:00:00 2001 From: Stephen Benjamin Date: Tue, 23 Jun 2026 14:30:46 -0400 Subject: [PATCH] Fix empty Slack summary in payload-agent-analyze notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit agentic-ci --no-streaming mixes non-JSON header lines (e.g. "▶ Backend: local") into stdout alongside stream-json output. jq aborts on the first non-JSON line and never reaches the {"type":"result"} record, leaving SUMMARY empty and Slack showing "No summary available." Pre-filter with grep to pass only JSON lines to jq. Co-Authored-By: Claude Opus 4.6 --- .../payload/agent/openshift-claude-payload-agent-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/openshift/claude/payload/agent/openshift-claude-payload-agent-commands.sh b/ci-operator/step-registry/openshift/claude/payload/agent/openshift-claude-payload-agent-commands.sh index 773ac2e22aef9..3df6601ed00e0 100644 --- a/ci-operator/step-registry/openshift/claude/payload/agent/openshift-claude-payload-agent-commands.sh +++ b/ci-operator/step-registry/openshift/claude/payload/agent/openshift-claude-payload-agent-commands.sh @@ -576,7 +576,7 @@ agentic_ci --no-streaming \ --continue \ --max-turns 5 \ > "${SLACK_LOG}" 2>&1 || true -SUMMARY=$(jq -r 'select(.type == "result") | .result // empty' "${SLACK_LOG}" 2>/dev/null | head -1) || SUMMARY="" +SUMMARY=$(grep -E '^\{' "${SLACK_LOG}" | jq -r 'select(.type == "result") | .result // empty' 2>/dev/null | head -1) || SUMMARY="" rm -f "${SLACK_LOG}" if [[ -n "${SLACK_WEBHOOK}" ]]; then