Context
The bootstrap left SqliteMetadataStore as engine + empty schema creation. All M1 services
need real persistence for the full entity set.
Deliverables
- SQLAlchemy table models for: Workspace metadata, Project, AnnotationSchema (+ LabelClass,
Attribute as structured JSON or child tables — decide and document), Source, IngestJob,
Asset, Batch, TaskGroup, AnnotationJob, Annotation, Dataset membership + change log,
Release (+ Manifest reference).
- Mapping layer between SQLAlchemy rows and the pydantic domain models (the domain never
imports SQLAlchemy types in its signatures).
- Initial schema creation as migration 001 (alembic or a minimal versioned-DDL mechanism —
decide here; the workspace format_version must gate it).
- Transaction scope helper: a unit-of-work per Project-aggregate operation.
Acceptance criteria
Context
The bootstrap left
SqliteMetadataStoreas engine + empty schema creation. All M1 servicesneed real persistence for the full entity set.
Deliverables
Attribute as structured JSON or child tables — decide and document), Source, IngestJob,
Asset, Batch, TaskGroup, AnnotationJob, Annotation, Dataset membership + change log,
Release (+ Manifest reference).
imports SQLAlchemy types in its signatures).
decide here; the workspace
format_versionmust gate it).Acceptance criteria
format_version=1; reopening validates itmypystrict stays green on the kernel