Symptom
`codedb_read path=foo line_start=99999 line_end=100000` returns success with body `hash:\n` (empty content). Same for `line_start=100 line_end=10` and negative `line_start`. Agents read empty content as "file is empty in that range" instead of "the range is malformed".
Failing test
`tests.test.issue-bug6: codedb_read errors when line_start > line_end`
Fix
Validate `line_start >= 1`, `line_end >= 1`, `line_start <= line_end` before extraction. Each invalid case → `error: ...`.
Labels
bug
Symptom
`codedb_read path=foo line_start=99999 line_end=100000` returns success with body `hash:\n` (empty content). Same for `line_start=100 line_end=10` and negative `line_start`. Agents read empty content as "file is empty in that range" instead of "the range is malformed".
Failing test
`tests.test.issue-bug6: codedb_read errors when line_start > line_end`
Fix
Validate `line_start >= 1`, `line_end >= 1`, `line_start <= line_end` before extraction. Each invalid case → `error: ...`.
Labels
bug