-
Notifications
You must be signed in to change notification settings - Fork 14
fix: signals agent test endpoint async handling #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace asyncio.new_event_loop() + run_until_complete() pattern with asyncio.run() for better compatibility with adcp library (v1.0.5). The new_event_loop() pattern was causing issues with the adcp library's internal anyio task group cleanup when connection failures occurred. Using asyncio.run() is the standard modern approach for running async code from synchronous contexts like Flask endpoints. Note: There may still be cleanup issues in the adcp library's MCP adapter that should be addressed upstream when handling connection failures, but this change improves compatibility. Fixes signals agent test endpoint functionality in admin UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Auto-generated schema updates from latest AdCP spec validation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update adcp dependency from 1.0.5 to 1.1.0 for improved MCP adapter cleanup handling. Note: The async cleanup issue when connection failures occur appears to be in the underlying mcp library's streamable_http client, not adcp itself. The adcp library passes through these errors properly, and the test_connection method in signals_agent_registry.py catches them correctly, so functionality is not impacted. The cleanup warnings are cosmetic and don't affect operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove temporary test scripts created during debugging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflicts in schema metadata files: - schemas/v1/_schemas_v1_core_format_json.json.meta - schemas/v1/_schemas_v1_core_product_json.json.meta - schemas/v1/index.json.meta Conflicts were only in download timestamps and etags. Content hashes are identical, confirming schema content is the same. Accepted newer timestamps from main branch. Merged changes from PR #719 (remove inventory sync requirement for mock adapter). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
bokelley
added a commit
that referenced
this pull request
Nov 8, 2025
Resolved conflicts in schema metadata files: - schemas/v1/_schemas_v1_core_format_json.json.meta - schemas/v1/_schemas_v1_core_product_json.json.meta - schemas/v1/index.json.meta All conflicts were timestamp/etag updates from schema downloads. Used main's versions (more recent timestamps). Merged changes from main: - fix: require authentication for sync_creatives and update_media_buy (#721) - fix: signals agent test endpoint async handling (#718) - fix: remove inventory sync requirement for mock adapter (#719) - fix: remove /a2a suffix from A2A endpoint URLs and add name field to configs - Migrate agent registries to adcp v1.0.1 library (#712)
danf-newton
pushed a commit
to Newton-Research-Inc/salesagent
that referenced
this pull request
Nov 24, 2025
* fix: use asyncio.run() for signals agent test endpoint Replace asyncio.new_event_loop() + run_until_complete() pattern with asyncio.run() for better compatibility with adcp library (v1.0.5). The new_event_loop() pattern was causing issues with the adcp library's internal anyio task group cleanup when connection failures occurred. Using asyncio.run() is the standard modern approach for running async code from synchronous contexts like Flask endpoints. Note: There may still be cleanup issues in the adcp library's MCP adapter that should be addressed upstream when handling connection failures, but this change improves compatibility. Fixes signals agent test endpoint functionality in admin UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: update AdCP schemas Auto-generated schema updates from latest AdCP spec validation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: update adcp library to 1.1.0 Update adcp dependency from 1.0.5 to 1.1.0 for improved MCP adapter cleanup handling. Note: The async cleanup issue when connection failures occur appears to be in the underlying mcp library's streamable_http client, not adcp itself. The adcp library passes through these errors properly, and the test_connection method in signals_agent_registry.py catches them correctly, so functionality is not impacted. The cleanup warnings are cosmetic and don't affect operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: remove debug test files Remove temporary test scripts created during debugging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixed the signals agent test endpoint (
/tenant/{id}/signals-agents/{id}/test) to useasyncio.run()instead of the manual event loop pattern for better compatibility with the adcp library (v1.0.5).Changes
asyncio.new_event_loop() + run_until_complete()withasyncio.run()Testing
All unit, integration, and integration_v2 tests pass. No breaking changes.
🤖 Generated with Claude Code