Repository navigation
Labels
Staleagent-taskauditAudit trackingAudit trackingbackendCreated for backendCreated for backenddatabaseCreated for databaseCreated for databasedocumentationImprovements or additions to documentationImprovements or additions to documentationmcp/agentmigrationsCreated for migrationsCreated for migrationsneeds-triagepersistenceCreated for persistenceCreated for persistencepipelinetriaged🟠 highCreated for 🟠 highCreated for 🟠 high
Description
[AUDIT-007] SQL Models Exceed Migration Coverage (🟠 HIGH)
Title: Reconcile SQL models with migration files (schema drift)
Description:
Rich SQL model surface (120+ lines of mixins in base.py) but only 3 migration files visible:
migrations/versions/001_...migrations/versions/002_...migrations/versions/003_...
Impact: Schema drift risk, unclear state ownership, silent migrations
Files to Review:
src/youtube_extension/backend/models/base.py(model mixins)src/youtube_extension/backend/migrations/versions/(only 3 files?)src/youtube_extension/backend/config/database.py(RLS config unclear)- All model files under
src/youtube_extension/backend/models/
Required Actions:
- Inventory all active SQL models
- Map models to migration coverage
- Identify unmigrated models (schema drift risk)
- Create missing migrations or deprecate models
- Document RLS and tenanting strategy
Acceptance Criteria:
- All active models have migration history
- No schema drift (model ≠ database)
- RLS and tenanting strategy documented
- Migration file naming consistent
Labels: 🟠 high, database, backend, migrations
Related: .github/AUDIT_FINDINGS_SESSION.md Section 7
Audit master doc: .github/AUDIT_FINDINGS_SESSION.md
Source session: https://github.com/groupthinking/EventRelay/tasks/36f6c3e5-60dc-4dfe-a151-ef2ab9114afa
Remediation phase: Phase 3: Medium (Month 2)
Cross-links: Previous: #2168 | Next: #2170 | Audit index: #2163
Reacted by Codex
Metadata
Metadata
Assignees
Labels
Staleagent-taskauditAudit trackingAudit trackingbackendCreated for backendCreated for backenddatabaseCreated for databaseCreated for databasedocumentationImprovements or additions to documentationImprovements or additions to documentationmcp/agentmigrationsCreated for migrationsCreated for migrationsneeds-triagepersistenceCreated for persistenceCreated for persistencepipelinetriaged🟠 highCreated for 🟠 highCreated for 🟠 high
Activity
linear-code commentedon Sep 20, 2026
GRV-665
github-actions commentedon Sep 20, 2026
👋 Thanks for opening this issue! It has been automatically labeled for triage.
groupthinking commentedon Sep 20, 2026
Tracker: #2175
fix(audit): complete all 12 AUDIT remediations (#2175)
chore(audit): close remaining remediation issues (#2175)
5 remaining items
kk-agent commentedon Sep 28, 2026
Max-aggressive cleanup 2026-09-28: EventRelay/UVAI product work is PARKED. Closing this stale/open item. Reopen if Hayden unparks the cut.
groupthinking commentedon Oct 8, 2026
Reopened; current source tree disproves the old three-revision inventory. PR #2378 corrects MIGRATION_TRUTH.md and preserves the historical claim. No legacy backend model/migration directory or claimed unit guard exists in inspected current main; alembic.ini remains dangling, while one Supabase SQL migration exists. BLOCKED for complete reconciliation: identify active database/owning service and obtain approved read-only deployed revision/RLS evidence; decide whether legacy Alembic config is retired or restored. No migration was generated/applied.
github-actions commentedon Nov 9, 2026
This issue has been automatically marked as stale due to inactivity.
fix(db): verify shared-state security and add PostgreSQL acceptance
docs(db): record verified hosted PostgreSQL acceptance