Skip to content

fix(messaging): align simple messaging thread events and client test deps#310

Open
Bermpje wants to merge 3 commits intoopenagents-org:developfrom
Bermpje:fix/simple-messaging-thread-events
Open

fix(messaging): align simple messaging thread events and client test deps#310
Bermpje wants to merge 3 commits intoopenagents-org:developfrom
Bermpje:fix/simple-messaging-thread-events

Conversation

@Bermpje
Copy link
Copy Markdown
Contributor

@Bermpje Bermpje commented Mar 15, 2026

Summary

  • align simple_messaging direct messages with the thread messaging event contract by using thread.direct_message.send
  • fall back to generic send_event() when a connector does not expose specialized direct or broadcast messaging helpers
  • install workspace/backend/requirements.txt in the client-tests workflow so workspace/backend/tests can import fastapi.testclient

Test plan

  • python -m pytest workspace/backend/tests -q

Bermpje added 2 commits March 15, 2026 14:17
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
Copilot AI review requested due to automatic review settings March 15, 2026 13:54
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 15, 2026

@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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_messaging direct-message event name to thread.direct_message.send.
  • Add connector fallbacks to send_event() when send_direct_message / send_broadcast_message helpers aren’t available.
  • Install workspace/backend/requirements.txt in the client-tests CI 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",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +38 to +42
@@ -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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
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.

2 participants