-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
databaseneeds-triageNew issue that hasn't been reviewed/prioritized yetNew issue that hasn't been reviewed/prioritized yettaskGeneral work item (implementation, setup, cleanup) – most common labelGeneral work item (implementation, setup, cleanup) – most common label
Milestone
Description
Description
Define strongly-typed Pydantic v2 models for validation/serialization and matching SQLAlchemy table definitions for the core entities: incidents, model registry, policy audits, and FAISS vector metadata.
Type
- Task
Focus Area (pick one)
- Shared Utils & Models
Priority
- High
Acceptance Criteria
- File:
shared/src/database/schemas.py- Pydantic v2 models:
IncidentBase,IncidentCreate,IncidentRead,IncidentInDB - Pydantic v2 models:
ModelRegistryBase,ModelCreate,ModelInDB - Pydantic v2 models:
PolicyAuditBase,PolicyAuditCreate,PolicyAuditInDB - Pydantic v2 model:
FaissVectorMetadata - Use
field_validator,ConfigDict(from_attributes=True), strict mode where appropriate
- Pydantic v2 models:
- File:
shared/src/database/models.py(or insidesqlite.py)- SQLAlchemy 2.0 declarative base classes matching above
- Tables created:
incidents,model_registry,policy_audits,faiss_vectors_metadata - Appropriate indexes: timestamp ranges, device_mac, incident_type, vector_id
- Modern
mapped_columnsyntax with typing
- Google-style docstrings on every model and field
- Alembic initial migration stub created (even if not applied yet)
- mypy strict mode passes
Blocker / Dependencies
- [Database] Implement robust async SQLite session factory + connection pooling
Notes / Links
- Reference: tentative schema in
docs/database_schema.md - Related files:
shared/src/database/session.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
databaseneeds-triageNew issue that hasn't been reviewed/prioritized yetNew issue that hasn't been reviewed/prioritized yettaskGeneral work item (implementation, setup, cleanup) – most common labelGeneral work item (implementation, setup, cleanup) – most common label
Projects
Status
Manual QA Testing