Skip to content

fix(log): truncate error and warning examples by character count - #5374

Open
Endidx wants to merge 1 commit into
rtk-ai:developfrom
Endidx:fix/log-unicode-ellipsis
Open

Endidx wants to merge 1 commit into
rtk-ai:developfrom
Endidx:fix/log-unicode-ellipsis

Conversation

@Endidx

@Endidx Endidx commented Dec 1, 2026

Copy link
Copy Markdown

Summary

Fixes #5354. A 100-character ERROR or WARN line containing multibyte text could lose its final three characters even though it fit the limit. Use the existing character-aware truncate helper for both severity lists, matching the unclassified examples.

Test plan

  • Added a regression through run_stdin_str covering ERROR and WARN with CJK text at 100 and 101 characters. The former must be preserved verbatim, the latter must contain the first 97 characters plus ....
  • Ran the regression in Rust Playground against the log analyzer and its helpers extracted from the base and patched sources. It failed on the base and all four assertions passed after the fix.
  • git diff --check passed. Full workspace Cargo checks were not run locally.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk log error and warning lists print ... after multibyte lines that were not cut

2 participants