Skip to content

kernel: real SqliteMetadataStore — SQLAlchemy models for all entities + initial migration #3

Description

@JArmandoAnaya

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

  • Round-trip tests: every entity persists and rehydrates equal (UUIDs, enums, JSON fields)
  • Annotation stores UUID PK, provenance, schema_version, geometry JSON
  • A fresh workspace creates schema at format_version=1; reopening validates it
  • mypy strict stays green on the kernel

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kernelvisionset.kernel — domain, ports, adapters, servicesm1M1 — Living kernel (0.0.1-alpha.1)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions