Memory index cap counts lines, not tokens #215

Open
opened 2026-11-21 12:36:54 +00:00 by johannes · 0 comments
Owner

Location: crates/hx-core/src/memory.rs, index cap
What is hacky: the cap is a line count; token size is assumed via a ~100 char line limit.
Proper fix: cap by estimated tokens/bytes.
Original comment: "ponytail: line count, not tokens; one index line is capped at ~100 chars so 50 lines ≈ 1.5k tokens."

Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).

Location: crates/hx-core/src/memory.rs, index cap What is hacky: the cap is a line count; token size is assumed via a ~100 char line limit. Proper fix: cap by estimated tokens/bytes. Original comment: "ponytail: line count, not tokens; one index line is capped at ~100 chars so 50 lines ≈ 1.5k tokens." Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).
johannes added the core label 2026-11-21 12:36:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#215