Skip to content

fix: avoid UTF-8 panic when truncating chat errors - #56

Merged
EXboys merged 1 commit into
EXboys:mainfrom
fengxue123-fly:pr1-utf8-safe-truncate-fork
Apr 27, 2026
Merged

EXboys merged 1 commit into
EXboys:mainfrom
fengxue123-fly:pr1-utf8-safe-truncate-fork

Conversation

@fengxue123-fly

Copy link
Copy Markdown

Use character-safe truncation in chat error formatting and add regression tests for ASCII, CJK, and emoji messages so long errors never panic on multibyte boundaries.

Made-with: Cursor

Summary

  • What problem does this PR solve?
  • Why this approach?

Task Linkage

  • Task ID: TASK-YYYY-NNN (or N/A for lightweight external/community PRs)
  • Task folder: tasks/TASK-YYYY-NNN-.../ (optional in lightweight mode)

Injected Specs

  • spec/architecture-boundaries.md (if architecture/layering changed)
  • spec/security-nonnegotiables.md (if sandbox/security changed)
  • spec/testing-policy.md (required for any code change)
  • spec/docs-sync.md (if behavior/docs/env/commands changed)

Validation Evidence

  • Commands executed:
    • ...
  • Key results:
    • ...

Regression Scope

  • Areas likely affected:
    • ...
  • Explicit non-goals:
    • ...

Docs Sync (EN/ZH)

  • Not needed
  • Updated EN + ZH docs
  • Files:
    • ...

Review Checklist

  • Acceptance criteria in tasks/.../TASK.md satisfied (or explicitly deferred)
  • tasks/.../STATUS.md updated with latest progress
  • tasks/.../REVIEW.md includes merge readiness decision
  • tasks/board.md status is up to date

Use character-safe truncation in chat error formatting and add regression tests for ASCII, CJK, and emoji messages so long errors never panic on multibyte boundaries.

Made-with: Cursor
@EXboys
EXboys merged commit 6b85996 into EXboys:main Apr 27, 2026
3 of 4 checks passed
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.

2 participants