Skip to content

refactor: inject messaging avatar url builder#840

Merged
shuxueshuxue merged 1 commit intodevfrom
brother/messaging-avatar-url-builder
Apr 19, 2026
Merged

refactor: inject messaging avatar url builder#840
shuxueshuxue merged 1 commit intodevfrom
brother/messaging-avatar-url-builder

Conversation

@shuxueshuxue
Copy link
Copy Markdown
Collaborator

Summary

  • introduce messaging/avatars.py as the messaging-owned avatar URL protocol
  • stop messaging/service.py and messaging/delivery/dispatcher.py from importing backend.web.utils.serializers directly
  • bind the real file-backed avatar URL builder from backend/web/core/lifespan.py, while keeping missing builder usage fail-loud on actual avatar projection paths

Verification

  • uv run python -m pytest tests/Unit/messaging/test_chat_delivery_dispatcher.py tests/Unit/messaging/test_module_independence.py tests/Integration/test_messaging_social_handle_contract.py -q -k "avatar or messaging_service or deliver_to_agents or chat_tool_list_chats or same_owner_agent_turn_delivers_to_sibling_actor_without_relationship"
  • uv run ruff check messaging/avatars.py messaging/service.py messaging/delivery/dispatcher.py backend/web/core/lifespan.py tests/Unit/messaging/test_chat_delivery_dispatcher.py tests/Unit/messaging/test_module_independence.py tests/Integration/test_messaging_social_handle_contract.py
  • .venv/bin/python -m pyright messaging/avatars.py messaging/service.py messaging/delivery/dispatcher.py
  • git diff --check

@shuxueshuxue shuxueshuxue merged commit a38b0d4 into dev Apr 19, 2026
7 checks passed
@shuxueshuxue shuxueshuxue deleted the brother/messaging-avatar-url-builder branch April 19, 2026 09:10
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