Skip to content

fix: reject empty created direct chat ids#815

Merged
shuxueshuxue merged 1 commit intodevfrom
brother/chat-tool-send-created-chat-empty-id-contract
Apr 18, 2026
Merged

fix: reject empty created direct chat ids#815
shuxueshuxue merged 1 commit intodevfrom
brother/chat-tool-send-created-chat-empty-id-contract

Conversation

@shuxueshuxue
Copy link
Copy Markdown
Collaborator

Summary

  • make ChatToolService direct send reject created chat ids that are empty or non-string
  • assert unread checks and send side effects do not run when direct-chat creation returns an invalid id
  • record the checkpoint in mycel-db-design commit a33db52

Verification

  • RED: uv run python -m pytest tests/Integration/test_messaging_social_handle_contract.py -q -k created_chat_id_is_empty -> failed with DID NOT RAISE before implementation
  • GREEN: uv run python -m pytest tests/Integration/test_messaging_social_handle_contract.py -q -k created_chat_id_is_empty -> 1 passed
  • 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 -> 92 passed
  • 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 a17e178 into dev Apr 18, 2026
7 checks passed
@shuxueshuxue shuxueshuxue deleted the brother/chat-tool-send-created-chat-empty-id-contract branch April 18, 2026 22:55
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