mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-26 01:15:52 +03:00
[PR #380] [CLOSED] Add competitor_analysis fallback for deep competitor onboarding scheduling #684
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#684
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/380
Author: @AJaySi
Created: 3/5/2026
Status: ❌ Closed
Base:
main← Head:codex/update-deep-competitor-scheduling-logic📝 Commits (1)
0bc2f5cAdd competitor_analysis fallback for deep competitor scheduling📊 Changes
2 files changed (+212 additions, -5 deletions)
View changed files
📝
backend/api/onboarding_utils/onboarding_completion_service.py(+70 -5)➕
backend/tests/test_onboarding_completion_service.py(+142 -0)📄 Description
Motivation
research_preferences.competitorsis empty by falling back to persistedCompetitorAnalysisrecords.CompetitorAnalysisrecords into the URL/domain format expected by theDeepCompetitorAnalysisTaskpayload so the analysis executor receives valid inputs.Description
_normalize_competitor_identifierto convert a string orCompetitorAnalysis-style record (keys likecompetitor_url,url,website_url,competitor_domain,domain) into a normalized URL or domain string._get_deep_competitor_targetswhich keepsresearch_preferences.competitorsas the primary source and falls back to normalizedintegrated_data["competitor_analysis"]with deduplication.complete_onboarding()so a deep competitorDeepCompetitorAnalysisTaskis scheduled when either source has entries, and only skipped when both are empty.research_preferencesvscompetitor_analysis) and the competitor count, and adjusted the skip warning message.backend/tests/test_onboarding_completion_service.pythat mocks integration points and asserts a deep competitor task is created and that the payload contains normalized competitor URLs/domains when onlycompetitor_analysisexists.Testing
pytest -q backend/tests/test_onboarding_completion_service.py, which passed (1 test, 1 passed, 1 warning).complete_onboarding()with mocked integration and database hooks and verifies the created task payload contains normalized competitors.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.