File: action/src/spantracker/tracker.ts lines 59-85
Summary: Added-file (59-71) and deleted-file (73-85) branches compute line counts with raw content.split('\n').length, off-by-one for any file with trailing newline ('foo\n'.split('\n').length === 2 but file has 1 line) and fabricates phantom line 1 for empty files (''.split('\n').length === 1). countLines() helper in packages/diff-engine/src/line-diff.ts:166-171 handles these correctly.
Fix direction: replace split('\n').length with countLines(); skip inserting mapping when count is 0.
File:
action/src/spantracker/tracker.tslines 59-85Summary: Added-file (59-71) and deleted-file (73-85) branches compute line counts with raw
content.split('\n').length, off-by-one for any file with trailing newline ('foo\n'.split('\n').length === 2but file has 1 line) and fabricates phantom line 1 for empty files (''.split('\n').length === 1).countLines()helper inpackages/diff-engine/src/line-diff.ts:166-171handles these correctly.Fix direction: replace
split('\n').lengthwithcountLines(); skip inserting mapping when count is 0.