main ← fix/summarization-stray-space
merged 08:42AM - 24 Sep 26 UTC
Previously, `FoldContent#truncate` split every post in half and joined the halve…s back with a space, even when nothing needed truncating. Every post sent to the LLM had a stray space in its middle, breaking words and links (e.g. `man.arch linux.org`), which then leaked into summaries. For long posts, the second half kept its first 500 tokens instead of its last ones, so their endings were dropped.
This change sends posts that fit the 1000-token budget untouched and keeps the first and last 500 tokens of longer ones. It also removes the unused `delete_cached_summaries!` and stale comments.
https://meta.discourse.org/t/topic-summarization-sends-to-llm-with-messages-with-extra-spaces-inside-words-or-links/411136