You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(coverage): a parse-error range can end one line past the end of the file #1966
scripts/setup-windows.ps1 has 326 lines. Its parse-coverage report ends the last range at line 327, which does not exist:
113-113,113-113,245-327
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.
Activity
DeusData commentedon Sep 7, 2026
Fixed on main by 98b94a2 (PR #1971, thank you @CaptainMittens). Ships in v0.10.9.