@@ -85,10 +85,46 @@ jobs:
8585 echo "❌ Devnet failed to start"
8686 exit 1
8787
88- - name : Call AVS
88+ - name : Call AVS and assert result is produced
89+ shell : bash
8990 run : |
91+ set -euo pipefail
9092 cd ./my-awesome-avs/
91- devkit avs call -- signature="(uint256,string)" args='(5,"hello")'
93+
94+ # Stream stderr to log and capture to file
95+ devkit avs call -- signature="(uint256,string)" args='(5,"hello")' \
96+ 1>/dev/null 2> >(tee call_stderr.log >&2) || true
97+
98+ # Optional: normalize by stripping ANSI control codes
99+ sed -E 's/\x1B\[[0-9;]*[A-Za-z]//g' call_stderr.log > call_stderr.clean
100+
101+ LOG="call_stderr.clean"
102+
103+ # Fail fast on explicit timeout
104+ if grep -q "Timeout: TaskVerified() not seen" "$LOG"; then
105+ echo "❌ Timeout waiting for TaskVerified()"
106+ tail -n 200 "$LOG" || true
107+ exit 1
108+ fi
109+
110+ # Ensure success marker is present
111+ if ! grep -q "TaskVerified event received:" "$LOG"; then
112+ echo "❌ No 'TaskVerified event received' marker found"
113+ tail -n 200 "$LOG" || true
114+ exit 1
115+ fi
116+
117+ # Extract result bytes: " - result: 0x..."
118+ RESULT_BYTES="$(grep -m1 -E '^[[:space:]-]*result:' "$LOG" | sed 's/.*result:\s*//')"
119+
120+ # Validate non-empty hex payload
121+ if [[ -z "${RESULT_BYTES}" ]] || ! [[ "${RESULT_BYTES}" =~ ^0x[0-9a-fA-F]{2,}$ ]]; then
122+ echo "❌ Invalid or empty result bytes: '${RESULT_BYTES:-<empty>}'"
123+ tail -n 200 "$LOG" || true
124+ exit 1
125+ fi
126+
127+ echo "✅ Result received: ${RESULT_BYTES}"
92128
93129 - name : Verify stake table roots
94130 run : |
0 commit comments