scripts/setup-windows.ps1 has 326 lines. Its parse-coverage report ends the last range at line 327, which does not exist:
Found while building the CI coverage gate in #1941; not fixed there.
What happens
The tree-sitter node for that region is start=(244,2) end=(326,0). An end column of 0 means the node stopped right after the previous line's newline, so it holds no text on the row it points at. cbm_error_regions_push adds 1 to that row to convert to 1-based, which names one line past the end of the file whenever a region runs to EOF.
Why it matters
A reader told to open line 327 of a 326-line file has been given advice that cannot be followed, in a report whose whole job is to say honestly which lines are missing. It also inflates the range's share of the file, which the coverage gate added in #1941 measures against a 25% threshold.
Suggested fix
Clamp the end to the row above when the end column is 0 and the node spans more than one row.
Related: #963, #1941. Sibling finding: the duplicated 113-113 range in the same string.
scripts/setup-windows.ps1has 326 lines. Its parse-coverage report ends the last range at line 327, which does not exist:Found while building the CI coverage gate in #1941; not fixed there.
What happens
The tree-sitter node for that region is
start=(244,2) end=(326,0). An end column of 0 means the node stopped right after the previous line's newline, so it holds no text on the row it points at.cbm_error_regions_pushadds 1 to that row to convert to 1-based, which names one line past the end of the file whenever a region runs to EOF.Why it matters
A reader told to open line 327 of a 326-line file has been given advice that cannot be followed, in a report whose whole job is to say honestly which lines are missing. It also inflates the range's share of the file, which the coverage gate added in #1941 measures against a 25% threshold.
Suggested fix
Clamp the end to the row above when the end column is 0 and the node spans more than one row.
Related: #963, #1941. Sibling finding: the duplicated
113-113range in the same string.