Skip to content

[ITEM-101] Add connector configuration and packaging#184

Open
ja0x wants to merge 2 commits intofeat/mc-2-infrastructurefrom
feat/mc-3-config
Open

[ITEM-101] Add connector configuration and packaging#184
ja0x wants to merge 2 commits intofeat/mc-2-infrastructurefrom
feat/mc-3-config

Conversation

@ja0x
Copy link
Copy Markdown
Contributor

@ja0x ja0x commented Apr 9, 2026

Summary

  • Add delivery config keys: max_concurrent_tasks, provider_cache_ttl
  • Add connectors and initialization.token_expiration config sections
  • Wire PluginDependencies, Hooks, and bus_publisher into controller
  • Add asyncpg to requirements and debian dependencies
  • Register connectors plugin entry point in setup.py

Test plan

  • chatd starts with default config
  • Config endpoint returns new keys

Note

Medium Risk
Introduces new plugin/config surfaces and changes async DB connection argument parsing, which could affect startup and database connectivity across environments if URIs include uncommon query params.

Overview
Adds first-class connector support: enables the rooms plugin by default in sample config, introduces a new connectors configuration section, and registers a new connectors plugin entry point.

Extends runtime wiring by adding a shared DAO instance and a new Hooks dispatcher into the plugin dependency injection, and refactors controller lifecycle management to use ExitStack.

Updates async Postgres handling to use asyncpg, including packaging/dependencies (requirements.txt, debian/control) and improved URI parsing that maps sslmode and selected Postgres GUCs into connect_args/server_settings (with expanded unit tests).

Reviewed by Cursor Bugbot for commit 2802234. Bugbot is set up for automated code reviews on this repo. Configure here.

@notion-workspace
Copy link
Copy Markdown

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3078469. Configure here.

Comment thread wazo_chatd/config.py
@ja0x ja0x force-pushed the feat/mc-2-infrastructure branch from 37582fb to f065e0e Compare April 9, 2026 18:53
@ja0x ja0x force-pushed the feat/mc-3-config branch from 3078469 to f713309 Compare April 9, 2026 18:54
@ja0x ja0x force-pushed the feat/mc-2-infrastructure branch from f065e0e to 39fc0c6 Compare April 9, 2026 21:44
@ja0x ja0x force-pushed the feat/mc-3-config branch from f713309 to 56500d7 Compare April 9, 2026 21:44
@ja0x ja0x force-pushed the feat/mc-2-infrastructure branch from 39fc0c6 to c3004a0 Compare April 10, 2026 02:11
@ja0x ja0x force-pushed the feat/mc-3-config branch from 56500d7 to 6a3e487 Compare April 10, 2026 02:11
@ja0x ja0x force-pushed the feat/mc-2-infrastructure branch from 1dbed3d to 77e3659 Compare April 10, 2026 16:34
@ja0x ja0x force-pushed the feat/mc-3-config branch from 6a3e487 to 8cad119 Compare April 10, 2026 16:36
ja0x added 2 commits April 13, 2026 11:56
SQLAlchemy's asyncpg dialect forwards URI query params as kwargs to
asyncpg.connect(). application_name is a Postgres GUC, not an asyncpg
kwarg, which made the connector fail to connect in production with
"connect() got an unexpected keyword argument 'application_name'".

Consolidate URI parsing into a single _build_async_engine_args helper
that translates sslmode into an ssl bool and routes known Postgres GUCs
through server_settings.
Add connector-related config keys (delivery, connectors, initialization).
Wire PluginDependencies TypedDict and Hooks into controller.
Add asyncpg dependency. Register connectors plugin entry point.
@ja0x ja0x force-pushed the feat/mc-3-config branch from 8cad119 to 2802234 Compare April 13, 2026 15:57
@sonarqubecloud
Copy link
Copy Markdown

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