mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 00:45:54 +03:00
[PR #343] [MERGED] Align integration provider contract and add wrapper/registry contract coverage #313
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#313
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/343
Author: @AJaySi
Created: 2/11/2026
Status: ✅ Merged
Merged: 2/11/2026
Merged by: @AJaySi
Base:
main← Head:codex/align-protocols-and-implement-unified-contract-style📝 Commits (1)
badfe79Align integration provider contract and add contract tests📊 Changes
6 files changed (+532 additions, -49 deletions)
View changed files
📝
backend/services/integrations/base.py(+12 -22)📝
backend/services/integrations/enhanced_integration_provider.py(+76 -18)📝
backend/services/integrations/registry.py(+204 -9)➕
backend/tests/integrations/test_enhanced_provider_contract.py(+103 -0)➕
backend/tests/integrations/test_registry_smoke.py(+119 -0)➕
backend/tests/integrations/test_registry_typing.py(+18 -0)📄 Description
Motivation
provider_id,user_id, andstateso downstream code can rely on stable shapes.Description
backend/services/integrations/base.pyby switching mutable defaults tofield(default_factory=...)and clarifying the synchronousIntegrationProviderprotocol signature (all required constructor fields remain explicit).backend/services/integrations/enhanced_integration_provider.pyto provide a synchronous wrapper implementing the full contract (get_auth_url,handle_callback,get_connection_status,refresh_token,disconnect,list_connected_accounts), added resilient fallback return objects that always include required dataclass fields, and replaced async sleeps with synchronous backoff.backend/services/integrations/registry.pyprovider adapters (gsc,bing,wordpress,wix) so each class implements the full protocol surface and consistently constructsAuthUrlPayload/ConnectionResult/ConnectionStatus/RefreshResult/Accountwith required fields provided.backend/tests/integrations/including runtime smoke tests forget_provider('gsc'|'bing'|'wordpress'|'wix'), enhanced wrapper success/failure contract tests, and a static typing assertion file for theget_provider(...)return contract.Testing
PYTHONPATH=backend python -m unittest backend.tests.integrations.test_registry_smoke backend.tests.integrations.test_enhanced_provider_contract, which completed successfully (all tests passed).PYTHONPATH=backend python -m mypy --ignore-missing-imports backend/tests/integrations/test_registry_typing.py, which reported no issues in the checked file under the given mypy flags.python -m py_compileacross the modified modules and test files, which succeeded.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.