Skip to content

fix: reject created direct chats missing ids#814

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

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

Conversation

@shuxueshuxue
Copy link
Copy Markdown
Collaborator

Summary

  • make ChatToolService direct send fail loudly when find_or_create_chat returns a chat without id
  • assert unread checks and send side effects do not run on malformed direct-chat creation output
  • record the checkpoint in mycel-db-design commit c1c6798

Verification

  • RED: uv run python -m pytest tests/Integration/test_messaging_social_handle_contract.py -q -k created_chat_is_missing_id -> failed with raw KeyError before implementation
  • GREEN: uv run python -m pytest tests/Integration/test_messaging_social_handle_contract.py -q -k created_chat_is_missing_id -> 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 -> 91 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 33dea8e into dev Apr 18, 2026
7 checks passed
@shuxueshuxue shuxueshuxue deleted the brother/chat-tool-send-created-chat-id-contract branch April 18, 2026 22:43
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