diff --git a/scripts/harb-evaluator/red-team.sh b/scripts/harb-evaluator/red-team.sh index 607b134..ae4a0e0 100755 --- a/scripts/harb-evaluator/red-team.sh +++ b/scripts/harb-evaluator/red-team.sh @@ -298,8 +298,12 @@ for text in texts: } if current: - # Capture floor readings — take the last match in the block (most recent value) - floor_matches = list(re.finditer(r"(?:floor|ethPerToken|lm.?eth)[^\d]*?(\d{4,})\s*(?:wei)?", text, re.IGNORECASE)) + # Capture lm_eth_after only from the structured final-report label + # ("lm_eth_after: wei"). Mid-execution "Total LM ETH: X wei" + # lines are deliberately excluded: they reflect intermediate chain state + # (e.g. after staking before revert) and must not be recorded as the + # confirmed post-strategy ETH balance. + floor_matches = list(re.finditer(r"lm_eth_after\s*:\s*(\d+)", text, re.IGNORECASE)) if floor_matches: current["lm_eth_after"] = int(floor_matches[-1].group(1))