mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 17:15:19 -07:00
Follow-up to discussion_r3831361300 on #1058. Both non-truncated return paths handed back the trimmed working copy, so an error like " request timed out\n" came back altered even though nothing had been omitted. That contradicted the stated intent that short errors pass through untouched, and left `display` differing from `full` for no reason. `display` is now byte-identical to `full` whenever `truncated` is false — the trimmed copy is only used for measuring against the budget and for building the shortened head. Documented on the field. Verified across padded short errors, clean short errors, empty and whitespace-only input, and either side of the threshold: display === full on every untruncated case, and `full` matches the input exactly in all of them. One visible consequence: with whitespace-pre-wrap on the description, an error carrying leading or trailing newlines now renders with that blank space. Trivial for the messages this sees in practice, and the alternative was silently editing the text. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>