Skip to content

Commit 690fb27

Browse files
committed
fix: use pipe delimiter in find_comment_markers to avoid splitting CMT: marker
The find_comment_markers awk function used ":" as the delimiter to return "marker:position" pairs. Since the CMT: marker itself contains a colon, split("CMT::1", parts, ":") would parse incorrectly, producing found_marker="CMT" instead of "CMT:" and an empty marker_pos. This caused pos to never advance, resulting in an infinite loop that hung the CI for nearly 5 hours. Switch the internal delimiter from ":" to "|" which does not appear in any comment marker string.
1 parent 228d6aa commit 690fb27

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/validate-refine-plan-io.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ scan_cmt_blocks() {
8989
if (closest_marker == "") {
9090
return ""
9191
} else {
92-
return closest_marker ":" closest_pos
92+
return closest_marker "|" closest_pos
9393
}
9494
}
9595
@@ -189,7 +189,7 @@ scan_cmt_blocks() {
189189
break
190190
}
191191
192-
split(marker_info, parts, ":")
192+
split(marker_info, parts, "|")
193193
found_marker = parts[1]
194194
marker_pos = parts[2]
195195
token_rel = marker_pos - pos + 1
@@ -244,7 +244,7 @@ scan_cmt_blocks() {
244244
break
245245
}
246246
247-
split(marker_info, parts, ":")
247+
split(marker_info, parts, "|")
248248
found_marker = parts[1]
249249
marker_pos = parts[2]
250250
token_rel = marker_pos - pos + 1

0 commit comments

Comments
 (0)