fix(messaging): align simple messaging thread events and client test deps#310
fix(messaging): align simple messaging thread events and client test deps#310Bermpje wants to merge 3 commits intoopenagents-org:developfrom
Conversation
Use the thread direct-message event and fall back to generic event sending for connectors that do not expose specialized messaging helpers. Made-with: Cursor
Install workspace backend requirements before running workspace backend tests so FastAPI imports resolve in the client-tests job. Made-with: Cursor
|
@Bermpje is attempting to deploy a commit to the Raphael's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This PR updates the simple_messaging adapter to emit thread-style direct-message events and makes the adapter resilient when a connector lacks specialized direct/broadcast send helpers. It also adjusts the GitHub Actions client-tests workflow so workspace backend tests can import FastAPI’s TestClient.
Changes:
- Update
simple_messagingdirect-message event name tothread.direct_message.send. - Add connector fallbacks to
send_event()whensend_direct_message/send_broadcast_messagehelpers aren’t available. - Install
workspace/backend/requirements.txtin theclient-testsCI job to satisfy backend test imports.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/openagents/mods/communication/simple_messaging/adapter.py |
Changes DM event name and adds connector fallback behavior for sending events. |
.github/workflows/pytest.yml |
Installs workspace backend requirements during client-tests to support backend test imports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| # Create and send the message | ||
| message = Event( | ||
| event_name="agent.direct_message.send", | ||
| event_name="thread.direct_message.send", |
There was a problem hiding this comment.
Fixed — the SimpleMessagingNetworkMod now also registers a handler for thread.direct_message.* events, so both the old agent.direct_message.* and new thread.* event names are processed. This ensures simple_messaging features (history, file attachments) work regardless of which event namespace the adapter uses.
.github/workflows/pytest.yml
Outdated
| @@ -39,6 +39,7 @@ jobs: | |||
| python -m pip install --upgrade pip | |||
| pip install pytest pytest-asyncio pytest-aiohttp pytest-mock | |||
| pip install -e . | |||
| pip install -r workspace/backend/requirements.txt | |||
There was a problem hiding this comment.
Fixed — created a minimal workspace/backend/requirements-test.txt with only the deps needed for tests (fastapi, sqlalchemy, pydantic, httpx), avoiding heavyweight packages like playwright, boto3, and firebase-admin. Also updated the pip cache key to include this file so dependency changes bust the cache.
- Register thread.direct_message.* handler in SimpleMessagingNetworkMod so DMs routed via the thread namespace are still processed for history and file attachments - Replace full requirements.txt with minimal requirements-test.txt in CI to avoid installing playwright, boto3, firebase-admin etc. - Include requirements-test.txt in pip cache key Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
simple_messagingdirect messages with the thread messaging event contract by usingthread.direct_message.sendsend_event()when a connector does not expose specialized direct or broadcast messaging helpersworkspace/backend/requirements.txtin theclient-testsworkflow soworkspace/backend/testscan importfastapi.testclientTest plan
python -m pytest workspace/backend/tests -q