Skip to content

fix: reject invalid chat summary unread counts#817

Merged
shuxueshuxue merged 1 commit intodevfrom
brother/chat-tool-list-unread-count-contract
Apr 18, 2026
Merged

fix: reject invalid chat summary unread counts#817
shuxueshuxue merged 1 commit intodevfrom
brother/chat-tool-list-unread-count-contract

Conversation

@shuxueshuxue
Copy link
Copy Markdown
Collaborator

Summary

  • fail loudly when ChatToolService list_chats receives a malformed unread_count projection
  • stop before unread filtering/rendering can leak raw comparison errors

Verification

  • uv run python -m pytest tests/Integration/test_messaging_social_handle_contract.py -q -k integer_unread_count
  • uv run python -m pytest tests/Integration/test_messaging_social_handle_contract.py tests/Unit/backend/web/services/test_chat_delivery_hook.py tests/Unit/messaging/test_chat_delivery_dispatcher.py -q
  • uv run ruff format messaging/tools/chat_tool_service.py tests/Integration/test_messaging_social_handle_contract.py --check
  • uv run ruff check messaging/tools/chat_tool_service.py tests/Integration/test_messaging_social_handle_contract.py
  • .venv/bin/python -m pyright messaging/tools/chat_tool_service.py
  • git diff --check

@shuxueshuxue shuxueshuxue merged commit 47f9883 into dev Apr 18, 2026
7 checks passed
@shuxueshuxue shuxueshuxue deleted the brother/chat-tool-list-unread-count-contract branch April 18, 2026 23:12
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.

1 participant