Summary
- Adds
TaskMode enum (FARGATE/WORKER) to enable hybrid workflow execution
- Adds
task_mode column to cortex_execution table with FARGATE as default
- No behavior changes - just schema preparation for worker service
Why
Fargate cold start (~100s) is too slow for fast iteration during development. This migration prepares the infrastructure for an always-on worker service that can execute workflows instantly (~2s).
What
common/db/enums.py: Add TaskMode enum
common/db/models.py: Add task_mode column to CortexExecution
- Migration file: Creates enum type and column with index
How to test
- Run migration locally:
uv run alembic upgrade head
- Verify column exists with default FARGATE
Notes
- Part 1 of 3-PR series for worker service
- PR2 will add feature flag, API changes, and worker service code
- PR3 will add Terraform for worker ECS service
🤖 Generated with Claude Code