From f830f3672a33103db9519e4d9086c846e38d68dd Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 26 Mar 2026 20:28:18 +0000 Subject: [PATCH] fix: smoke test treats function definitions as calls in BusyBox awk (#773) Add "(" to the get_candidates skip list so that function definition lines (e.g. memory_guard() {) are not extracted as call candidates. Previously this was masked by get_fns also being broken on BusyBox awk, but fixing get_fns exposed the get_candidates gap. Co-Authored-By: Claude Opus 4.6 (1M context) --- .woodpecker/agent-smoke.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.woodpecker/agent-smoke.sh b/.woodpecker/agent-smoke.sh index 2e8eb9c..80b6160 100644 --- a/.woodpecker/agent-smoke.sh +++ b/.woodpecker/agent-smoke.sh @@ -67,9 +67,10 @@ get_candidates() { if (match(p, /^[a-z][a-zA-Z0-9_]*_[a-zA-Z0-9_]+/)) { word = substr(p, RSTART, RLENGTH) rest = substr(p, RSTART + RLENGTH, 1) - # Skip: case labels (word) or word|), Python/jq patterns (word:), - # object method calls (word.method), assignments (word=) - if (rest == ")" || rest == "|" || rest == ":" || rest == "." || rest == "=") continue + # Skip: function definitions (word(), case labels (word) or word|), + # Python/jq patterns (word:), object method calls (word.method), + # assignments (word=) + if (rest == "(" || rest == ")" || rest == "|" || rest == ":" || rest == "." || rest == "=") continue print word } }