Drop Compass tables, models and usage actor

Merged
EM
20h ago
+182-99

Follow-up to #16099. Merge only after #16099 is deployed, so pods running the old code never hit missing tables and queued usage jobs have drained.

Stacked on compass-cleanup. GitHub retargets this to main when #16099 merges.

Changes

  • Migration b679b748f61d (revises 8675636fe905):
    • Drops compass_thread_messages and compass_threads.
    • Removes the compass_enabled key from organizations.feature_settings.
    • Downgrade recreates the empty tables but doesn't restore the flag, since there's no record of which orgs had it.
  • Models: deletes CompassThread and CompassThreadMessage.
  • Worker: deletes the polar_self.track_compass_assistant_usage actor and PolarSelfClient.track_compass_assistant_usage. #16099 already stopped enqueuing it.

Testing

  • Ran the migration up, down and up again against the local DB. After upgrade, both tables were gone and 0 orgs had the flag (1 had it before).
  • alembic check: no new operations.
  • task check_migrations: OK, single head.
  • task lint, task lint_types, tests/integrations/polar and the seed tests (209 passed).

After merging, refresh the test template DB with POLAR_ENV=testing uv run task db_migrate.

šŸ¤– Generated with Claude Code