From 2c9b8e386f2c6de2ef79bdfc955cbe9eb597beb7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Apr 2026 07:43:49 +0000 Subject: [PATCH] fix: rename awk variable in_body to inbody to avoid smoke test false positive The agent-smoke.sh function resolution checker matches lowercase_underscore identifiers as potential bash function calls. The awk variable `in_body` inside sprint-filer.sh's heredoc triggered a false [undef] failure. Also fixes SC2155 (declare and assign separately) in the same file. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/sprint-filer.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/sprint-filer.sh b/lib/sprint-filer.sh index 80c9814..e2b45a6 100755 --- a/lib/sprint-filer.sh +++ b/lib/sprint-filer.sh @@ -129,7 +129,7 @@ parse_subissue_entries() { BEGIN { printf "[" first = 1 - in_body = 0 + inbody = 0 id = ""; title = ""; labels = ""; depends = ""; body = "" } @@ -154,7 +154,7 @@ parse_subissue_entries() { printf "{\"id\":\"%s\",\"title\":\"%s\",\"labels\":%s,\"depends_on\":%s,\"body\":\"%s\"}", id, title, labels, depends, body id = ""; title = ""; labels = "[]"; depends = "[]"; body = "" - in_body = 0 + inbody = 0 } /^- id:/ { @@ -213,19 +213,19 @@ parse_subissue_entries() { } /^ body: *\|/ { - in_body = 1 + inbody = 1 body = "" next } - in_body && /^ / { + inbody && /^ / { sub(/^ /, "") body = body $0 "\n" next } - in_body && !/^ / && !/^$/ { - in_body = 0 + inbody && !/^ / && !/^$/ { + inbody = 0 # This line starts a new field or entry — re-process it # (awk does not support re-scanning, so handle common cases) if ($0 ~ /^- id:/) { @@ -485,7 +485,8 @@ check_and_close_completed_visions() { # All sub-issues closed — close the vision issue filer_log "All ${sub_count} sub-issues for vision #${vid} are closed — closing vision" - local comment_body="## Vision Issue Completed + local comment_body + comment_body="## Vision Issue Completed All sub-issues have been implemented and merged. This vision issue is now closed.