Skip to content

fix(orchestration): wire WorkflowExecutor into scheduler startup (#2166)#2201

Merged
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-2166
Mar 23, 2026
Merged

fix(orchestration): wire WorkflowExecutor into scheduler startup (#2166)#2201
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-2166

Conversation

@mrveiss
Copy link
Owner

@mrveiss mrveiss commented Mar 23, 2026

Summary

WorkflowScheduler.set_workflow_executor() was defined but never called from startup code. Non-template scheduled workflows silently failed with {"success": False, "error": "No template_id"}.

Adds _wire_scheduler_executor() to Phase 2 background init in initialization/lifespan.py that:

  • Creates EnhancedOrchestrator instance
  • Defines adapter routing template workflows to existing handler, non-template to full orchestration
  • Calls workflow_scheduler.set_workflow_executor() at startup
  • Gracefully falls back if wiring fails (template-only still works)

Changes

  • initialization/lifespan.py: New _wire_scheduler_executor() function + call in initialize_background_services()

Test plan

  • Backend starts without errors (check [ 98%] Scheduler: Orchestration executor wired in logs)
  • Schedule a template-based workflow — should execute as before
  • Schedule a non-template workflow (via API with user_message but no template_id) — should now execute via EnhancedOrchestrator instead of silently failing

Closes #2166

Add _wire_scheduler_executor() to Phase 2 background init that:
- Creates EnhancedOrchestrator and adapter function
- Routes template workflows to _default_template_executor (unchanged)
- Routes non-template workflows through full orchestration pipeline
- Calls workflow_scheduler.set_workflow_executor() at startup
- Gracefully falls back to template-only if wiring fails
@github-actions
Copy link

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss mrveiss merged commit 0d2cfde into Dev_new_gui Mar 23, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant