feat(subscriptions): implement full subscription indexing pipeline
Production Jetstream Consumer:
- Start community consumer in main.go (not just tests)
- Subscribe to social.coves.community.subscription collection
- Handle CREATE, UPDATE, DELETE operations atomically
- Idempotent event handling (safe for Jetstream replays)
ContentVisibility Implementation (1-5 scale):
- Handler: Accept contentVisibility parameter (default: 3)
- Service: Clamp to valid range, write to PDS with user token
- Consumer: Extract from events, index in AppView
- Repository: Store with CHECK constraint, composite indexes
Fixed Critical Bugs:
- Use social.coves.community.subscription (not social.coves.actor.subscription)
- DELETE operations properly delete from PDS (unsubscribe bug fix)
- Atomic subscriber count updates (SubscribeWithCount/UnsubscribeWithCount)
Subscriber Count Management:
- Increment on CREATE, decrement on DELETE
- Atomic updates prevent race conditions
- Idempotent operations prevent double-counting
Impact:
- ✅ Subscriptions now indexed in AppView from Jetstream
- ✅ Feed generation enabled (know who subscribes to what)
- ✅ ContentVisibility stored for feed customization
- ✅ Subscriber counts accurate
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>