mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 00:45:54 +03:00
[PR #431] Persist GSC comparable-window delta events and expose latest alerts retrieval #735
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#735
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/431
Author: @AJaySi
Created: 3/12/2026
Status: 🔄 Open
Base:
main← Head:codex/implement-delta-event-processing-and-retrieval📝 Commits (1)
328a81dAdd persisted GSC delta events and latest alerts retrieval📊 Changes
4 files changed (+377 additions, -28 deletions)
View changed files
📝
backend/models/platform_insights_monitoring_models.py(+40 -0)➕
backend/services/analytics/opportunity_alerts_service.py(+62 -0)📝
backend/services/analytics/platform_analytics_service.py(+24 -0)📝
backend/services/scheduler/executors/gsc_insights_executor.py(+251 -28)📄 Description
Motivation
decline/rise/opportunity) and severity metadata so downstream features can prioritize signals.Description
PlatformInsightDeltaEventmodel/table to persist delta events with ownership,event_type,entity_type,entity_key, comparable-window metadata,detailspayload,severity, and relevant indexes (backend/models/platform_insights_monitoring_models.py).GSCInsightsExecutorto fetch the current 30-day window and the prior comparable 30-day window, compute per-pageand per-querydeltas (clicks/impressions/CTR/position), label events using in-code thresholds (decline/rise/opportunity), and persist events toplatform_insight_delta_eventswhile deduplicating by current window (backend/services/scheduler/executors/gsc_insights_executor.py).OpportunityAlertsServiceto provide a lightweight, user-scoped retrieval API for the latest persisted events with filtering by platform/site/event types (backend/services/analytics/opportunity_alerts_service.py).get_latest_opportunities_alerts(...)onPlatformAnalyticsServiceto let UIs and analytics layers fetch precomputed events without recomputing deltas (backend/services/analytics/platform_analytics_service.py).detailsJSON containing metrics, deltas, reasons, thresholds, and window metadata.Testing
python -m py_compile backend/models/platform_insights_monitoring_models.py backend/services/scheduler/executors/gsc_insights_executor.py backend/services/analytics/opportunity_alerts_service.py backend/services/analytics/platform_analytics_service.py, which succeeded without syntax errors.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.