A community based topic aggregation platform built on atproto

test: update integration tests for community.comment namespace

Update all comment integration tests to use the new
social.coves.community.comment namespace.

Files updated:
- comment_consumer_test.go: 18 tests covering create/update/delete
- comment_query_test.go: 11 tests covering queries and pagination
- comment_vote_test.go: 6 tests covering voting on comments

All test data now uses the correct namespace for URI construction,
$type fields, and collection names. Tests verify that the new
namespace works correctly throughout the entire comment lifecycle.

All 22 integration tests passing ✅

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

+82 -82
+61 -61
tests/integration/comment_consumer_test.go
··· 32 32 33 33 t.Run("Create comment on post", func(t *testing.T) { 34 34 rkey := generateTID() 35 - uri := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey) 35 + uri := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey) 36 36 37 37 // Simulate Jetstream comment create event 38 38 event := &jetstream.JetstreamEvent{ ··· 41 41 Commit: &jetstream.CommitEvent{ 42 42 Rev: "test-rev", 43 43 Operation: "create", 44 - Collection: "social.coves.feed.comment", 44 + Collection: "social.coves.community.comment", 45 45 RKey: rkey, 46 46 CID: "bafytest123", 47 47 Record: map[string]interface{}{ 48 - "$type": "social.coves.feed.comment", 48 + "$type": "social.coves.community.comment", 49 49 "content": "This is a test comment on a post!", 50 50 "reply": map[string]interface{}{ 51 51 "root": map[string]interface{}{ ··· 115 115 Commit: &jetstream.CommitEvent{ 116 116 Rev: "test-rev", 117 117 Operation: "create", 118 - Collection: "social.coves.feed.comment", 118 + Collection: "social.coves.community.comment", 119 119 RKey: rkey, 120 120 CID: "bafytest456", 121 121 Record: map[string]interface{}{ 122 - "$type": "social.coves.feed.comment", 122 + "$type": "social.coves.community.comment", 123 123 "content": "Idempotent test comment", 124 124 "reply": map[string]interface{}{ 125 125 "root": map[string]interface{}{ ··· 191 191 t.Run("Create nested comment replies", func(t *testing.T) { 192 192 // Create first-level comment on post 193 193 comment1Rkey := generateTID() 194 - comment1URI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, comment1Rkey) 194 + comment1URI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, comment1Rkey) 195 195 196 196 event1 := &jetstream.JetstreamEvent{ 197 197 Did: testUser.DID, 198 198 Kind: "commit", 199 199 Commit: &jetstream.CommitEvent{ 200 200 Operation: "create", 201 - Collection: "social.coves.feed.comment", 201 + Collection: "social.coves.community.comment", 202 202 RKey: comment1Rkey, 203 203 CID: "bafycomment1", 204 204 Record: map[string]interface{}{ ··· 225 225 226 226 // Create second-level comment (reply to first comment) 227 227 comment2Rkey := generateTID() 228 - comment2URI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, comment2Rkey) 228 + comment2URI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, comment2Rkey) 229 229 230 230 event2 := &jetstream.JetstreamEvent{ 231 231 Did: testUser.DID, 232 232 Kind: "commit", 233 233 Commit: &jetstream.CommitEvent{ 234 234 Operation: "create", 235 - Collection: "social.coves.feed.comment", 235 + Collection: "social.coves.community.comment", 236 236 RKey: comment2Rkey, 237 237 CID: "bafycomment2", 238 238 Record: map[string]interface{}{ ··· 346 346 347 347 t.Run("Update comment content preserves vote counts", func(t *testing.T) { 348 348 rkey := generateTID() 349 - uri := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey) 349 + uri := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey) 350 350 351 351 // Create initial comment 352 352 createEvent := &jetstream.JetstreamEvent{ ··· 354 354 Kind: "commit", 355 355 Commit: &jetstream.CommitEvent{ 356 356 Operation: "create", 357 - Collection: "social.coves.feed.comment", 357 + Collection: "social.coves.community.comment", 358 358 RKey: rkey, 359 359 CID: "bafyoriginal", 360 360 Record: map[string]interface{}{ ··· 395 395 Kind: "commit", 396 396 Commit: &jetstream.CommitEvent{ 397 397 Operation: "update", 398 - Collection: "social.coves.feed.comment", 398 + Collection: "social.coves.community.comment", 399 399 RKey: rkey, 400 400 CID: "bafyupdated", 401 401 Record: map[string]interface{}{ ··· 472 472 473 473 t.Run("Delete comment decrements parent count", func(t *testing.T) { 474 474 rkey := generateTID() 475 - uri := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey) 475 + uri := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey) 476 476 477 477 // Create comment 478 478 createEvent := &jetstream.JetstreamEvent{ ··· 480 480 Kind: "commit", 481 481 Commit: &jetstream.CommitEvent{ 482 482 Operation: "create", 483 - Collection: "social.coves.feed.comment", 483 + Collection: "social.coves.community.comment", 484 484 RKey: rkey, 485 485 CID: "bafydelete", 486 486 Record: map[string]interface{}{ ··· 518 518 Kind: "commit", 519 519 Commit: &jetstream.CommitEvent{ 520 520 Operation: "delete", 521 - Collection: "social.coves.feed.comment", 521 + Collection: "social.coves.community.comment", 522 522 RKey: rkey, 523 523 }, 524 524 } ··· 559 559 Kind: "commit", 560 560 Commit: &jetstream.CommitEvent{ 561 561 Operation: "create", 562 - Collection: "social.coves.feed.comment", 562 + Collection: "social.coves.community.comment", 563 563 RKey: rkey, 564 564 CID: "bafyidempdelete", 565 565 Record: map[string]interface{}{ ··· 590 590 Kind: "commit", 591 591 Commit: &jetstream.CommitEvent{ 592 592 Operation: "delete", 593 - Collection: "social.coves.feed.comment", 593 + Collection: "social.coves.community.comment", 594 594 RKey: rkey, 595 595 }, 596 596 } ··· 651 651 Kind: "commit", 652 652 Commit: &jetstream.CommitEvent{ 653 653 Operation: "create", 654 - Collection: "social.coves.feed.comment", 654 + Collection: "social.coves.community.comment", 655 655 RKey: generateTID(), 656 656 CID: "bafyinvalid", 657 657 Record: map[string]interface{}{ ··· 683 683 Kind: "commit", 684 684 Commit: &jetstream.CommitEvent{ 685 685 Operation: "create", 686 - Collection: "social.coves.feed.comment", 686 + Collection: "social.coves.community.comment", 687 687 RKey: generateTID(), 688 688 CID: "bafyinvalid2", 689 689 Record: map[string]interface{}{ ··· 715 715 Kind: "commit", 716 716 Commit: &jetstream.CommitEvent{ 717 717 Operation: "create", 718 - Collection: "social.coves.feed.comment", 718 + Collection: "social.coves.community.comment", 719 719 RKey: generateTID(), 720 720 CID: "bafyinvalid3", 721 721 Record: map[string]interface{}{ ··· 747 747 Kind: "commit", 748 748 Commit: &jetstream.CommitEvent{ 749 749 Operation: "create", 750 - Collection: "social.coves.feed.comment", 750 + Collection: "social.coves.community.comment", 751 751 RKey: generateTID(), 752 752 CID: "bafyinvalid4", 753 753 Record: map[string]interface{}{ ··· 779 779 Kind: "commit", 780 780 Commit: &jetstream.CommitEvent{ 781 781 Operation: "create", 782 - Collection: "social.coves.feed.comment", 782 + Collection: "social.coves.community.comment", 783 783 RKey: generateTID(), 784 784 CID: "bafytoobig", 785 785 Record: map[string]interface{}{ ··· 814 814 Kind: "commit", 815 815 Commit: &jetstream.CommitEvent{ 816 816 Operation: "create", 817 - Collection: "social.coves.feed.comment", 817 + Collection: "social.coves.community.comment", 818 818 RKey: generateTID(), 819 819 CID: "bafymalformed", 820 820 Record: map[string]interface{}{ ··· 849 849 Kind: "commit", 850 850 Commit: &jetstream.CommitEvent{ 851 851 Operation: "create", 852 - Collection: "social.coves.feed.comment", 852 + Collection: "social.coves.community.comment", 853 853 RKey: generateTID(), 854 854 CID: "bafymalformed2", 855 855 Record: map[string]interface{}{ ··· 911 911 // |- Comment 4 912 912 913 913 comment1 := &comments.Comment{ 914 - URI: fmt.Sprintf("at://%s/social.coves.feed.comment/1", testUser.DID), 914 + URI: fmt.Sprintf("at://%s/social.coves.community.comment/1", testUser.DID), 915 915 CID: "bafyc1", 916 916 RKey: "1", 917 917 CommenterDID: testUser.DID, ··· 925 925 } 926 926 927 927 comment2 := &comments.Comment{ 928 - URI: fmt.Sprintf("at://%s/social.coves.feed.comment/2", testUser.DID), 928 + URI: fmt.Sprintf("at://%s/social.coves.community.comment/2", testUser.DID), 929 929 CID: "bafyc2", 930 930 RKey: "2", 931 931 CommenterDID: testUser.DID, ··· 939 939 } 940 940 941 941 comment3 := &comments.Comment{ 942 - URI: fmt.Sprintf("at://%s/social.coves.feed.comment/3", testUser.DID), 942 + URI: fmt.Sprintf("at://%s/social.coves.community.comment/3", testUser.DID), 943 943 CID: "bafyc3", 944 944 RKey: "3", 945 945 CommenterDID: testUser.DID, ··· 953 953 } 954 954 955 955 comment4 := &comments.Comment{ 956 - URI: fmt.Sprintf("at://%s/social.coves.feed.comment/4", testUser.DID), 956 + URI: fmt.Sprintf("at://%s/social.coves.community.comment/4", testUser.DID), 957 957 CID: "bafyc4", 958 958 RKey: "4", 959 959 CommenterDID: testUser.DID, ··· 1074 1074 // When C1 finally arrives, its reply_count should be 1, not 0 1075 1075 1076 1076 parentRkey := generateTID() 1077 - parentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, parentRkey) 1077 + parentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, parentRkey) 1078 1078 1079 1079 childRkey := generateTID() 1080 - childURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, childRkey) 1080 + childURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, childRkey) 1081 1081 1082 1082 // Step 1: Index child FIRST (before parent exists) 1083 1083 childEvent := &jetstream.JetstreamEvent{ ··· 1086 1086 Commit: &jetstream.CommitEvent{ 1087 1087 Rev: "child-rev", 1088 1088 Operation: "create", 1089 - Collection: "social.coves.feed.comment", 1089 + Collection: "social.coves.community.comment", 1090 1090 RKey: childRkey, 1091 1091 CID: "bafychild", 1092 1092 Record: map[string]interface{}{ 1093 - "$type": "social.coves.feed.comment", 1093 + "$type": "social.coves.community.comment", 1094 1094 "content": "This is a reply to a comment that doesn't exist yet!", 1095 1095 "reply": map[string]interface{}{ 1096 1096 "root": map[string]interface{}{ ··· 1128 1128 Commit: &jetstream.CommitEvent{ 1129 1129 Rev: "parent-rev", 1130 1130 Operation: "create", 1131 - Collection: "social.coves.feed.comment", 1131 + Collection: "social.coves.community.comment", 1132 1132 RKey: parentRkey, 1133 1133 CID: "bafyparent", 1134 1134 Record: map[string]interface{}{ 1135 - "$type": "social.coves.feed.comment", 1135 + "$type": "social.coves.community.comment", 1136 1136 "content": "This is the parent comment arriving late", 1137 1137 "reply": map[string]interface{}{ 1138 1138 "root": map[string]interface{}{ ··· 1178 1178 1179 1179 t.Run("Multiple children arrive before parent", func(t *testing.T) { 1180 1180 parentRkey := generateTID() 1181 - parentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, parentRkey) 1181 + parentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, parentRkey) 1182 1182 1183 1183 // Index 3 children before parent 1184 1184 for i := 1; i <= 3; i++ { ··· 1189 1189 Commit: &jetstream.CommitEvent{ 1190 1190 Rev: fmt.Sprintf("child-%d-rev", i), 1191 1191 Operation: "create", 1192 - Collection: "social.coves.feed.comment", 1192 + Collection: "social.coves.community.comment", 1193 1193 RKey: childRkey, 1194 1194 CID: fmt.Sprintf("bafychild%d", i), 1195 1195 Record: map[string]interface{}{ 1196 - "$type": "social.coves.feed.comment", 1196 + "$type": "social.coves.community.comment", 1197 1197 "content": fmt.Sprintf("Reply %d before parent", i), 1198 1198 "reply": map[string]interface{}{ 1199 1199 "root": map[string]interface{}{ ··· 1223 1223 Commit: &jetstream.CommitEvent{ 1224 1224 Rev: "parent2-rev", 1225 1225 Operation: "create", 1226 - Collection: "social.coves.feed.comment", 1226 + Collection: "social.coves.community.comment", 1227 1227 RKey: parentRkey, 1228 1228 CID: "bafyparent2", 1229 1229 Record: map[string]interface{}{ 1230 - "$type": "social.coves.feed.comment", 1230 + "$type": "social.coves.community.comment", 1231 1231 "content": "Parent with 3 pre-existing children", 1232 1232 "reply": map[string]interface{}{ 1233 1233 "root": map[string]interface{}{ ··· 1283 1283 postURI := createTestPost(t, db, testCommunity, testUser.DID, "Resurrection Test", 0, time.Now()) 1284 1284 1285 1285 rkey := generateTID() 1286 - commentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey) 1286 + commentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey) 1287 1287 1288 1288 t.Run("Recreate deleted comment with same rkey", func(t *testing.T) { 1289 1289 // Step 1: Create initial comment ··· 1293 1293 Commit: &jetstream.CommitEvent{ 1294 1294 Rev: "v1", 1295 1295 Operation: "create", 1296 - Collection: "social.coves.feed.comment", 1296 + Collection: "social.coves.community.comment", 1297 1297 RKey: rkey, 1298 1298 CID: "bafyoriginal", 1299 1299 Record: map[string]interface{}{ 1300 - "$type": "social.coves.feed.comment", 1300 + "$type": "social.coves.community.comment", 1301 1301 "content": "Original comment content", 1302 1302 "reply": map[string]interface{}{ 1303 1303 "root": map[string]interface{}{ ··· 1338 1338 Commit: &jetstream.CommitEvent{ 1339 1339 Rev: "v2", 1340 1340 Operation: "delete", 1341 - Collection: "social.coves.feed.comment", 1341 + Collection: "social.coves.community.comment", 1342 1342 RKey: rkey, 1343 1343 }, 1344 1344 } ··· 1365 1365 Commit: &jetstream.CommitEvent{ 1366 1366 Rev: "v3", 1367 1367 Operation: "create", 1368 - Collection: "social.coves.feed.comment", 1368 + Collection: "social.coves.community.comment", 1369 1369 RKey: rkey, // Same rkey! 1370 1370 CID: "bafyresurrected", 1371 1371 Record: map[string]interface{}{ 1372 - "$type": "social.coves.feed.comment", 1372 + "$type": "social.coves.community.comment", 1373 1373 "content": "Resurrected comment with new content", 1374 1374 "reply": map[string]interface{}{ 1375 1375 "root": map[string]interface{}{ ··· 1424 1424 post2URI := createTestPost(t, db, testCommunity, testUser.DID, "Post 2", 0, time.Now()) 1425 1425 1426 1426 rkey2 := generateTID() 1427 - commentURI2 := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey2) 1427 + commentURI2 := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey2) 1428 1428 1429 1429 // Step 1: Create comment on Post 1 1430 1430 createEvent := &jetstream.JetstreamEvent{ ··· 1433 1433 Commit: &jetstream.CommitEvent{ 1434 1434 Rev: "v1", 1435 1435 Operation: "create", 1436 - Collection: "social.coves.feed.comment", 1436 + Collection: "social.coves.community.comment", 1437 1437 RKey: rkey2, 1438 1438 CID: "bafyv1", 1439 1439 Record: map[string]interface{}{ 1440 - "$type": "social.coves.feed.comment", 1440 + "$type": "social.coves.community.comment", 1441 1441 "content": "Original on Post 1", 1442 1442 "reply": map[string]interface{}{ 1443 1443 "root": map[string]interface{}{ ··· 1476 1476 Commit: &jetstream.CommitEvent{ 1477 1477 Rev: "v2", 1478 1478 Operation: "delete", 1479 - Collection: "social.coves.feed.comment", 1479 + Collection: "social.coves.community.comment", 1480 1480 RKey: rkey2, 1481 1481 }, 1482 1482 } ··· 1502 1502 Commit: &jetstream.CommitEvent{ 1503 1503 Rev: "v3", 1504 1504 Operation: "create", 1505 - Collection: "social.coves.feed.comment", 1505 + Collection: "social.coves.community.comment", 1506 1506 RKey: rkey2, // Same rkey! 1507 1507 CID: "bafyv3", 1508 1508 Record: map[string]interface{}{ 1509 - "$type": "social.coves.feed.comment", 1509 + "$type": "social.coves.community.comment", 1510 1510 "content": "New comment on Post 2", 1511 1511 "reply": map[string]interface{}{ 1512 1512 "root": map[string]interface{}{ ··· 1588 1588 postURI2 := createTestPost(t, db, testCommunity, testUser.DID, "Post 2", 0, time.Now()) 1589 1589 1590 1590 rkey := generateTID() 1591 - commentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey) 1591 + commentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey) 1592 1592 1593 1593 t.Run("Reject UPDATE that changes parent URI", func(t *testing.T) { 1594 1594 // Create comment on Post 1 ··· 1598 1598 Commit: &jetstream.CommitEvent{ 1599 1599 Rev: "v1", 1600 1600 Operation: "create", 1601 - Collection: "social.coves.feed.comment", 1601 + Collection: "social.coves.community.comment", 1602 1602 RKey: rkey, 1603 1603 CID: "bafycomment1", 1604 1604 Record: map[string]interface{}{ 1605 - "$type": "social.coves.feed.comment", 1605 + "$type": "social.coves.community.comment", 1606 1606 "content": "Comment on Post 1", 1607 1607 "reply": map[string]interface{}{ 1608 1608 "root": map[string]interface{}{ ··· 1631 1631 Commit: &jetstream.CommitEvent{ 1632 1632 Rev: "v2", 1633 1633 Operation: "update", 1634 - Collection: "social.coves.feed.comment", 1634 + Collection: "social.coves.community.comment", 1635 1635 RKey: rkey, 1636 1636 CID: "bafycomment2", 1637 1637 Record: map[string]interface{}{ 1638 - "$type": "social.coves.feed.comment", 1638 + "$type": "social.coves.community.comment", 1639 1639 "content": "Trying to hijack this comment to Post 2", 1640 1640 "reply": map[string]interface{}{ 1641 1641 "root": map[string]interface{}{ ··· 1679 1679 1680 1680 t.Run("Allow UPDATE that only changes content (threading unchanged)", func(t *testing.T) { 1681 1681 rkey2 := generateTID() 1682 - commentURI2 := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey2) 1682 + commentURI2 := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey2) 1683 1683 1684 1684 // Create comment 1685 1685 createEvent := &jetstream.JetstreamEvent{ ··· 1688 1688 Commit: &jetstream.CommitEvent{ 1689 1689 Rev: "v1", 1690 1690 Operation: "create", 1691 - Collection: "social.coves.feed.comment", 1691 + Collection: "social.coves.community.comment", 1692 1692 RKey: rkey2, 1693 1693 CID: "bafycomment3", 1694 1694 Record: map[string]interface{}{ 1695 - "$type": "social.coves.feed.comment", 1695 + "$type": "social.coves.community.comment", 1696 1696 "content": "Original content", 1697 1697 "reply": map[string]interface{}{ 1698 1698 "root": map[string]interface{}{ ··· 1721 1721 Commit: &jetstream.CommitEvent{ 1722 1722 Rev: "v2", 1723 1723 Operation: "update", 1724 - Collection: "social.coves.feed.comment", 1724 + Collection: "social.coves.community.comment", 1725 1725 RKey: rkey2, 1726 1726 CID: "bafycomment4", 1727 1727 Record: map[string]interface{}{ 1728 - "$type": "social.coves.feed.comment", 1728 + "$type": "social.coves.community.comment", 1729 1729 "content": "Updated content", 1730 1730 "reply": map[string]interface{}{ 1731 1731 "root": map[string]interface{}{
+6 -6
tests/integration/comment_query_test.go
··· 538 538 commentURIs := make([]string, 5) 539 539 for i := 0; i < 5; i++ { 540 540 rkey := generateTID() 541 - uri := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, rkey) 541 + uri := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, rkey) 542 542 commentURIs[i] = uri 543 543 544 544 event := &jetstream.JetstreamEvent{ ··· 546 546 Kind: "commit", 547 547 Commit: &jetstream.CommitEvent{ 548 548 Operation: "create", 549 - Collection: "social.coves.feed.comment", 549 + Collection: "social.coves.community.comment", 550 550 RKey: rkey, 551 551 CID: fmt.Sprintf("bafyc%d", i), 552 552 Record: map[string]interface{}{ 553 - "$type": "social.coves.feed.comment", 553 + "$type": "social.coves.community.comment", 554 554 "content": fmt.Sprintf("Comment %d", i), 555 555 "reply": map[string]interface{}{ 556 556 "root": map[string]interface{}{ ··· 576 576 Kind: "commit", 577 577 Commit: &jetstream.CommitEvent{ 578 578 Operation: "delete", 579 - Collection: "social.coves.feed.comment", 579 + Collection: "social.coves.community.comment", 580 580 RKey: strings.Split(commentURIs[1], "/")[4], 581 581 }, 582 582 } ··· 587 587 Kind: "commit", 588 588 Commit: &jetstream.CommitEvent{ 589 589 Operation: "delete", 590 - Collection: "social.coves.feed.comment", 590 + Collection: "social.coves.community.comment", 591 591 RKey: strings.Split(commentURIs[3], "/")[4], 592 592 }, 593 593 } ··· 794 794 795 795 ctx := context.Background() 796 796 rkey := generateTID() 797 - uri := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", commenterDID, rkey) 797 + uri := fmt.Sprintf("at://%s/social.coves.community.comment/%s", commenterDID, rkey) 798 798 799 799 // Insert comment directly for speed 800 800 _, err := db.ExecContext(ctx, `
+15 -15
tests/integration/comment_vote_test.go
··· 43 43 t.Run("Upvote on comment increments count", func(t *testing.T) { 44 44 // Create a comment 45 45 commentRKey := generateTID() 46 - commentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, commentRKey) 46 + commentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, commentRKey) 47 47 commentCID := "bafycomment123" 48 48 49 49 commentEvent := &jetstream.JetstreamEvent{ ··· 52 52 Commit: &jetstream.CommitEvent{ 53 53 Rev: "test-rev", 54 54 Operation: "create", 55 - Collection: "social.coves.feed.comment", 55 + Collection: "social.coves.community.comment", 56 56 RKey: commentRKey, 57 57 CID: commentCID, 58 58 Record: map[string]interface{}{ 59 - "$type": "social.coves.feed.comment", 59 + "$type": "social.coves.community.comment", 60 60 "content": "Comment to vote on", 61 61 "reply": map[string]interface{}{ 62 62 "root": map[string]interface{}{ ··· 143 143 t.Run("Downvote on comment increments downvote count", func(t *testing.T) { 144 144 // Create a comment 145 145 commentRKey := generateTID() 146 - commentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, commentRKey) 146 + commentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, commentRKey) 147 147 commentCID := "bafycomment456" 148 148 149 149 commentEvent := &jetstream.JetstreamEvent{ ··· 152 152 Commit: &jetstream.CommitEvent{ 153 153 Rev: "test-rev", 154 154 Operation: "create", 155 - Collection: "social.coves.feed.comment", 155 + Collection: "social.coves.community.comment", 156 156 RKey: commentRKey, 157 157 CID: commentCID, 158 158 Record: map[string]interface{}{ 159 - "$type": "social.coves.feed.comment", 159 + "$type": "social.coves.community.comment", 160 160 "content": "Comment to downvote", 161 161 "reply": map[string]interface{}{ 162 162 "root": map[string]interface{}{ ··· 221 221 t.Run("Delete vote decrements comment counts", func(t *testing.T) { 222 222 // Create comment 223 223 commentRKey := generateTID() 224 - commentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, commentRKey) 224 + commentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, commentRKey) 225 225 commentCID := "bafycomment789" 226 226 227 227 commentEvent := &jetstream.JetstreamEvent{ ··· 230 230 Commit: &jetstream.CommitEvent{ 231 231 Rev: "test-rev", 232 232 Operation: "create", 233 - Collection: "social.coves.feed.comment", 233 + Collection: "social.coves.community.comment", 234 234 RKey: commentRKey, 235 235 CID: commentCID, 236 236 Record: map[string]interface{}{ 237 - "$type": "social.coves.feed.comment", 237 + "$type": "social.coves.community.comment", 238 238 "content": "Comment for vote deletion test", 239 239 "reply": map[string]interface{}{ 240 240 "root": map[string]interface{}{ ··· 353 353 t.Run("Viewer with vote sees vote state", func(t *testing.T) { 354 354 // Create comment 355 355 commentRKey := generateTID() 356 - commentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, commentRKey) 356 + commentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, commentRKey) 357 357 commentCID := "bafycomment111" 358 358 359 359 commentEvent := &jetstream.JetstreamEvent{ ··· 362 362 Commit: &jetstream.CommitEvent{ 363 363 Rev: "test-rev", 364 364 Operation: "create", 365 - Collection: "social.coves.feed.comment", 365 + Collection: "social.coves.community.comment", 366 366 RKey: commentRKey, 367 367 CID: commentCID, 368 368 Record: map[string]interface{}{ 369 - "$type": "social.coves.feed.comment", 369 + "$type": "social.coves.community.comment", 370 370 "content": "Comment with viewer vote", 371 371 "reply": map[string]interface{}{ 372 372 "root": map[string]interface{}{ ··· 465 465 t.Run("Viewer without vote sees empty state", func(t *testing.T) { 466 466 // Create comment (no vote) 467 467 commentRKey := generateTID() 468 - commentURI := fmt.Sprintf("at://%s/social.coves.feed.comment/%s", testUser.DID, commentRKey) 468 + commentURI := fmt.Sprintf("at://%s/social.coves.community.comment/%s", testUser.DID, commentRKey) 469 469 470 470 commentEvent := &jetstream.JetstreamEvent{ 471 471 Did: testUser.DID, ··· 473 473 Commit: &jetstream.CommitEvent{ 474 474 Rev: "test-rev", 475 475 Operation: "create", 476 - Collection: "social.coves.feed.comment", 476 + Collection: "social.coves.community.comment", 477 477 RKey: commentRKey, 478 478 CID: "bafycomment222", 479 479 Record: map[string]interface{}{ 480 - "$type": "social.coves.feed.comment", 480 + "$type": "social.coves.community.comment", 481 481 "content": "Comment without viewer vote", 482 482 "reply": map[string]interface{}{ 483 483 "root": map[string]interface{}{