Skip to content

Handle invalid UTF-8 in router responses#508

Merged
iMicknl merged 1 commit into
mainfrom
codex/tolerate-invalid-utf8
Jul 19, 2026
Merged

Handle invalid UTF-8 in router responses#508
iMicknl merged 1 commit into
mainfrom
codex/tolerate-invalid-utf8

Conversation

@iMicknl

@iMicknl iMicknl commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • retain strict JSON decoding for compliant router responses
  • recover otherwise valid JSON when router firmware includes invalid UTF-8 bytes
  • add a regression test covering replacement of an invalid byte

Addresses iMicknl/ha-sagemcom-fast#268.

Testing

  • uv run pytest
  • uv run prek run --all-files
  • git diff --check

Copilot AI review requested due to automatic review settings July 19, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@iMicknl iMicknl added the fix label Jul 19, 2026
@iMicknl
iMicknl merged commit 8ec3038 into main Jul 19, 2026
5 checks passed
@iMicknl
iMicknl deleted the codex/tolerate-invalid-utf8 branch July 19, 2026 20:02
@iMicknl iMicknl added the bug Something isn't working label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants