diff --git a/services/platform-service/src/lib/cosmos-init.ts b/services/platform-service/src/lib/cosmos-init.ts index 7e940933..180c0657 100644 --- a/services/platform-service/src/lib/cosmos-init.ts +++ b/services/platform-service/src/lib/cosmos-init.ts @@ -29,11 +29,29 @@ const CONTAINER_DEFS: Record = { themes: { partitionKeyPath: '/id' }, // Waitlist (pre-launch signups) waitlist: { partitionKeyPath: '/email' }, - // Mobile capture primitives (MindLyst-style). + // MindLyst modules + brains: { partitionKeyPath: '/userId' }, + streaks: { partitionKeyPath: '/userId' }, memory_items: { partitionKeyPath: '/userId' }, daily_briefs: { partitionKeyPath: '/userId' }, reflections: { partitionKeyPath: '/userId' }, brain_insights: { partitionKeyPath: '/userId' }, + share_cards: { partitionKeyPath: '/userId' }, + notification_log: { partitionKeyPath: '/userId' }, + analytics_events: { partitionKeyPath: '/userId' }, + brain_packs: { partitionKeyPath: '/userId' }, + chat_sessions: { partitionKeyPath: '/userId' }, + ab_experiments: { partitionKeyPath: '/id' }, + waitlist_entries: { partitionKeyPath: '/id' }, + email_captures: { partitionKeyPath: '/userId' }, + engagement_campaigns: { partitionKeyPath: '/id' }, + context_triggers: { partitionKeyPath: '/userId' }, + monitoring_reports: { partitionKeyPath: '/type' }, + nudge_state: { partitionKeyPath: '/userId' }, + triage_retries: { partitionKeyPath: '/userId' }, + // NOTE: MindLyst also uses 'referrals' with /userId partition key, but + // the growth module already registers it with /id. This mismatch needs + // a separate migration to reconcile. // NomGap fasting modules fasting_sessions: { partitionKeyPath: '/userId' }, fasting_protocols: { partitionKeyPath: '/userId' },