From 07b117c906fdaa37190fb6b6d76e8aec286a6d9e Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 17 Mar 2026 15:07:30 +0000 Subject: [PATCH 1/2] fix: \`compute_lm_total_eth\` awk parser reads only the line immediately after \`== Logs ==\` (#879) Replace getline-once approach with a forward-scan that skips blank lines and warning lines after the marker, finding the first digit-only line. --- scripts/harb-evaluator/red-team.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/harb-evaluator/red-team.sh b/scripts/harb-evaluator/red-team.sh index ae4a0e0..c2ed250 100755 --- a/scripts/harb-evaluator/red-team.sh +++ b/scripts/harb-evaluator/red-team.sh @@ -176,8 +176,9 @@ compute_lm_total_eth() { output=$(cd "$REPO_ROOT" && LM="$LM" WETH="$WETH" POOL="$POOL" \ "$FORGE" script onchain/script/LmTotalEth.s.sol \ --rpc-url "$RPC_URL" --root onchain 2>&1) - # forge script prints "== Logs ==" then " " — extract the number - result=$(echo "$output" | awk '/^== Logs ==/{getline; gsub(/^[[:space:]]+/,""); print; exit}') + # forge script prints "== Logs ==" then " " — extract the number. + # Scan all lines after the marker so blank lines or warning lines don't corrupt the result. + result=$(echo "$output" | awk '/^== Logs ==/{found=1; next} found && /^[[:space:]]*[0-9]+[[:space:]]*$/{gsub(/[[:space:]]/, ""); print; exit}') [[ -n "$result" && "$result" =~ ^[0-9]+$ ]] || die "Failed to read LM total ETH (forge output: $output)" echo "$result" } From f87b6d1fbb20cc79357d32bdca0fa38c590cd16c Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 17 Mar 2026 15:18:24 +0000 Subject: [PATCH 2/2] ci: retrigger after infra failure