mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-26 01:15:52 +03:00
[PR #390] [MERGED] Add degraded-mode regeneration for daily workflows and regeneration endpoint #696
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#696
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/390
Author: @AJaySi
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/8/2026
Merged by: @AJaySi
Base:
main← Head:codex/implement-regeneration-criteria-for-plans📝 Commits (1)
4621107Add degraded-mode workflow regeneration criteria and endpoint📊 Changes
2 files changed (+235 additions, -33 deletions)
View changed files
📝
backend/api/today_workflow.py(+88 -2)📝
backend/services/today_workflow_service.py(+147 -31)📄 Description
Motivation
Description
generation_mode,quality_score,generated_with_agentsand onboarding snapshot fields (onboarding_completed,onboarding_completed_at) insideplan_jsonfrom generation paths (agent_committee,llm,fallback)._compute_task_hash(title, description)and implement regeneration logicregenerate_daily_workflow_planthat reuses the sameDailyWorkflowPlanrow (or creates it) and maps unchanged task hashes to preservestatus,decided_at, andcompletion_notesduring replacement.get_or_create_daily_workflow_planto auto-regenerate when the existing plan metadata indicatesgeneration_mode == "fallback"withquality_score < FALLBACK_REGENERATION_QUALITY_THRESHOLDor when the plan predates onboarding completion and onboarding is now complete.POST /api/today-workflow/regenerateendpoint which is idempotent in effect, returns the regenerated plan/tasks, and enforces a simple in-memory per-user sliding-window rate limit (3requests per60seconds); also surfacedgeneration_mode,quality_score, andgenerated_with_agentsin the today-workflowplanpayload.Testing
python -m py_compile backend/services/today_workflow_service.py backend/api/today_workflow.pywhich succeeded.PYTHONPATH=backend pytest -q backend/test/test_today_workflow_service.pyand they passed (2 passed).Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.