mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 17:05:56 +03:00
[PR #401] [MERGED] Add competitor_analysis fallback and normalization for DeepCompetitorAnalysisTask scheduling #705
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#705
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/401
Author: @AJaySi
Created: 3/9/2026
Status: ✅ Merged
Merged: 3/9/2026
Merged by: @AJaySi
Base:
main← Head:codex/enhance-competitor-analysis-task-logic📝 Commits (1)
a19a18dAdd competitor_analysis fallback for deep competitor task scheduling📊 Changes
2 files changed (+318 additions, -7 deletions)
View changed files
📝
backend/api/onboarding_utils/onboarding_completion_service.py(+98 -7)➕
backend/regression_onboarding_completion_service.py(+220 -0)📄 Description
Motivation
research_preferences.competitorsis empty by using persistedintegrated_data["competitor_analysis"]as a fallback and improve observability of the source used.Description
_normalize_competitor_analysis_for_deep_task,_normalize_competitor_url,_extract_domain_from_url) toOnboardingCompletionServiceto convertcompetitor_analysisrecords into the{url, domain, name, summary}shape expected byDeepCompetitorAnalysisTask.payload["competitors"]inbackend/api/onboarding_utils/onboarding_completion_service.py.complete_onboardingscheduling logic to preferresearch_preferences.competitorsand fall back to the normalizedcompetitor_analysiswhen the primary source is empty, to schedule theDeepCompetitorAnalysisTaskwhen either source yields competitors, and to log source counts and the selected source for traceability.research_preferences.competitorsis empty butcompetitor_analysisexists and asserts aDeepCompetitorAnalysisTaskis created with a normalized competitor payload inbackend/regression_onboarding_completion_service.py.Testing
cd backend && pytest -q regression_onboarding_completion_service.py, which completed successfully (1 passed).Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.