Expand description
The transcript line rule, shared by the output.idx indexer and the
per-file line counter (Phase 5a-2,
SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md §6.3.7).
A line is the bytes between two \n (the last one may be unterminated).
It is counted unless it is blank: from_utf8_lossy(line).trim() is
empty, so \r (CRLF) and Unicode whitespace are blank, and invalid UTF-8
is not. This is the reader’s addressing (String::lines() filtered on
!trim().is_empty()); line k of a file is the k-th counted line.
Both users call is_blank_line, so they can’t drift apart.
Structs§
- Line
Count 🔒 - Where a file’s line counter stands after appending bytes.
Functions§
- count_
all 🔒 - The counter for a whole file’s content.
- count_
append 🔒 - The counter after appending
dataat byte offsetatto a file whose counter wasbefore.open_tailis the file’s bytes frombefore.tail_starttoat— the unterminated last line, empty when the file ends with\n— because appended bytes continue that line and can change whether it is blank. - is_
blank_ 🔒line - Whether
line(without its\n) is blank under the reader’s rule.