diff --git a/backend/app/infra/schedule/__init__.py b/backend/app/infra/schedule/__init__.py index 71da9cbdc..792b35005 100644 --- a/backend/app/infra/schedule/__init__.py +++ b/backend/app/infra/schedule/__init__.py @@ -1 +1,10 @@ -"""Secondary adapters for the schedule bounded context.""" +"""Secondary adapters for the schedule bounded context. + +Grouped by context rather than by technology, mirroring `domain/schedule/`: +everything the outer ring provides to this one context lives here, whether it +talks to SQL (`task_sql`, `run_sql`), converts a wire/storage shape +(`spec_mapping`), or wraps a runtime. + +`app/infra/persistence/feedback.py` still follows the older technology-first +layout because it belongs to a separate migration; the two will converge. +""" diff --git a/backend/app/infra/persistence/scheduled_task_runs.py b/backend/app/infra/schedule/run_sql.py similarity index 100% rename from backend/app/infra/persistence/scheduled_task_runs.py rename to backend/app/infra/schedule/run_sql.py diff --git a/backend/app/infra/persistence/scheduled_tasks.py b/backend/app/infra/schedule/task_sql.py similarity index 99% rename from backend/app/infra/persistence/scheduled_tasks.py rename to backend/app/infra/schedule/task_sql.py index b4ac3a774..c2f0d029d 100644 --- a/backend/app/infra/persistence/scheduled_tasks.py +++ b/backend/app/infra/schedule/task_sql.py @@ -1,5 +1,7 @@ """SQL adapter for the schedule context's task repository. +Sibling of `run_sql.py`; both consume `spec_mapping` for the stored JSON spec. + Secondary adapter implementing `ScheduledTaskRepository`. SQL/ORM vocabulary stops at this file: methods exchange domain objects and normalize SQLite's tz-naive reads. diff --git a/backend/tests/test_schedule_fakes.py b/backend/tests/test_schedule_fakes.py index 8f632900f..004c55a4f 100644 --- a/backend/tests/test_schedule_fakes.py +++ b/backend/tests/test_schedule_fakes.py @@ -28,8 +28,8 @@ from schedule_fakes import ( InMemoryScheduledTaskRepository, ) -from app.infra.persistence.scheduled_task_runs import SqlScheduledRunRepository -from app.infra.persistence.scheduled_tasks import SqlScheduledTaskRepository +from app.infra.schedule.run_sql import SqlScheduledRunRepository +from app.infra.schedule.task_sql import SqlScheduledTaskRepository from deerflow.config.database_config import DatabaseConfig from deerflow.domain.schedule.model import ( ACTIVE_RUN_STATUSES,