A community based topic aggregation platform built on atproto

docs: update documentation for completed namespace migration

Update COMMENT_SYSTEM_IMPLEMENTATION.md to reflect the completed
migration from social.coves.feed.comment to
social.coves.community.comment.

Changes:
- Mark Phase 4 (Namespace Migration) as COMPLETED (2025-11-16)
- Update all namespace references throughout the document
- Add migration completion details and scope

Documentation now accurately reflects the current implementation
using the community.comment namespace for all comment records.

๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Changed files
+18 -15
docs
+18 -15
docs/COMMENT_SYSTEM_IMPLEMENTATION.md
···
```json
{
"lexicon": 1,
-
"id": "social.coves.feed.comment",
+
"id": "social.coves.community.comment",
"defs": {
"main": {
"type": "record",
···
```sql
CREATE TABLE comments (
id BIGSERIAL PRIMARY KEY,
-
uri TEXT UNIQUE NOT NULL, -- AT-URI (at://commenter_did/social.coves.feed.comment/rkey)
+
uri TEXT UNIQUE NOT NULL, -- AT-URI (at://commenter_did/social.coves.community.comment/rkey)
cid TEXT NOT NULL, -- Content ID
rkey TEXT NOT NULL, -- Record key (TID)
commenter_did TEXT NOT NULL, -- User who commented (from AT-URI repo field)
···
return nil
}
-
if event.Commit.Collection == "social.coves.feed.comment" {
+
if event.Commit.Collection == "social.coves.community.comment" {
switch event.Commit.Operation {
case "create":
return c.createComment(ctx, event.Did, commit)
···
- Auto-reconnect on errors (5-second retry)
- Ping/pong keepalive (30-second ping, 60-second read deadline)
- Graceful shutdown via context cancellation
-
- Subscribes to: `wantedCollections=social.coves.feed.comment`
+
- Subscribes to: `wantedCollections=social.coves.community.comment`
---
···
// Start Jetstream consumer for comments
commentJetstreamURL := os.Getenv("COMMENT_JETSTREAM_URL")
if commentJetstreamURL == "" {
-
commentJetstreamURL = "ws://localhost:6008/subscribe?wantedCollections=social.coves.feed.comment"
+
commentJetstreamURL = "ws://localhost:6008/subscribe?wantedCollections=social.coves.community.comment"
}
commentEventConsumer := jetstream.NewCommentEventConsumer(commentRepo, db)
···
}()
log.Printf("Started Jetstream comment consumer: %s", commentJetstreamURL)
-
log.Println(" - Indexing: social.coves.feed.comment CREATE/UPDATE/DELETE operations")
+
log.Println(" - Indexing: social.coves.community.comment CREATE/UPDATE/DELETE operations")
log.Println(" - Updating: Post comment counts and comment reply counts atomically")
```
···
| Aspect | Votes | Comments |
|--------|-------|----------|
| **Location** | User repositories | User repositories |
-
| **Lexicon** | `social.coves.feed.vote` | `social.coves.feed.comment` |
+
| **Lexicon** | `social.coves.feed.vote` | `social.coves.community.comment` |
| **Operations** | CREATE, DELETE | CREATE, UPDATE, DELETE |
| **Mutability** | Immutable | Editable |
| **Foreign Keys** | None (out-of-order indexing) | None (out-of-order indexing) |
···
---
-
### ๐Ÿ“‹ Phase 4: Namespace Migration (Separate Task)
+
### โœ… Phase 4: Namespace Migration (COMPLETED)
+
+
**Completed:** 2025-11-16
**Scope:**
-
- Migrate existing `social.coves.feed.comment` records to `social.coves.community.comment`
-
- Update all AT-URIs in database
-
- Update Jetstream consumer collection filter
-
- Migration script with rollback capability
-
- Zero-downtime deployment strategy
+
- โœ… Migrated `social.coves.community.comment` namespace to `social.coves.community.comment`
+
- โœ… Updated lexicon definitions (record and query schemas)
+
- โœ… Updated Jetstream consumer collection filter
+
- โœ… Updated all code references (consumer, service, validation layers)
+
- โœ… Updated integration tests and test data generation scripts
+
- โœ… Created database migration (018_migrate_comment_namespace.sql)
-
**Note:** Currently out of scope - will be tackled separately when needed.
+
**Note:** Since we're pre-production, no historical data migration was needed. Migration script updates URIs in comments table (uri, root_uri, parent_uri columns).
---
···
### Environment Variables
```bash
# Jetstream URL (optional, defaults to localhost:6008)
-
export COMMENT_JETSTREAM_URL="ws://localhost:6008/subscribe?wantedCollections=social.coves.feed.comment"
+
export COMMENT_JETSTREAM_URL="ws://localhost:6008/subscribe?wantedCollections=social.coves.community.comment"
# Database URL
export TEST_DATABASE_URL="postgres://test_user:test_password@localhost:5434/coves_test?sslmode=disable"