A community based topic aggregation platform built on atproto

style: apply gofumpt formatting across codebase

Standardize import ordering and formatting using gofumpt.

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

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

+304 -211
+2 -1
internal/api/handlers/aggregator/errors.go
··· 1 1 package aggregator 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 4 "encoding/json" 6 5 "log" 7 6 "net/http" 7 + 8 + "Coves/internal/core/aggregators" 8 9 ) 9 10 10 11 // ErrorResponse represents an XRPC error response
+2 -1
internal/api/handlers/aggregator/get_authorizations.go
··· 1 1 package aggregator 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 4 "encoding/json" 6 5 "log" 7 6 "net/http" 8 7 "strconv" 8 + 9 + "Coves/internal/core/aggregators" 9 10 ) 10 11 11 12 // GetAuthorizationsHandler handles listing authorizations for an aggregator
+2 -1
internal/api/handlers/aggregator/get_services.go
··· 1 1 package aggregator 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 4 "encoding/json" 6 5 "log" 7 6 "net/http" 8 7 "strings" 8 + 9 + "Coves/internal/core/aggregators" 9 10 ) 10 11 11 12 // GetServicesHandler handles aggregator service details retrieval
+2 -1
internal/api/handlers/aggregator/list_for_community.go
··· 1 1 package aggregator 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 4 "encoding/json" 6 5 "log" 7 6 "net/http" 8 7 "strconv" 8 + 9 + "Coves/internal/core/aggregators" 9 10 ) 10 11 11 12 // ListForCommunityHandler handles listing aggregators for a community
+2 -1
internal/api/handlers/comments/errors.go
··· 1 1 package comments 2 2 3 3 import ( 4 - "Coves/internal/core/comments" 5 4 "encoding/json" 6 5 "log" 7 6 "net/http" 7 + 8 + "Coves/internal/core/comments" 8 9 ) 9 10 10 11 // errorResponse represents a standardized JSON error response
+3 -2
internal/api/handlers/comments/get_comments.go
··· 3 3 package comments 4 4 5 5 import ( 6 - "Coves/internal/api/middleware" 7 - "Coves/internal/core/comments" 8 6 "encoding/json" 9 7 "log" 10 8 "net/http" 11 9 "strconv" 10 + 11 + "Coves/internal/api/middleware" 12 + "Coves/internal/core/comments" 12 13 ) 13 14 14 15 // GetCommentsHandler handles comment retrieval for posts
+2 -1
internal/api/handlers/comments/middleware.go
··· 1 1 package comments 2 2 3 3 import ( 4 + "net/http" 5 + 4 6 "Coves/internal/api/middleware" 5 - "net/http" 6 7 ) 7 8 8 9 // OptionalAuthMiddleware wraps the existing OptionalAuth middleware from the middleware package.
+2 -1
internal/api/handlers/comments/service_adapter.go
··· 1 1 package comments 2 2 3 3 import ( 4 + "net/http" 5 + 4 6 "Coves/internal/core/comments" 5 - "net/http" 6 7 ) 7 8 8 9 // ServiceAdapter adapts the core comments.Service to the handler's Service interface
+3 -2
internal/api/handlers/community/block.go
··· 1 1 package community 2 2 3 3 import ( 4 - "Coves/internal/api/middleware" 5 - "Coves/internal/core/communities" 6 4 "encoding/json" 7 5 "log" 8 6 "net/http" 7 + 8 + "Coves/internal/api/middleware" 9 + "Coves/internal/core/communities" 9 10 ) 10 11 11 12 // BlockHandler handles community blocking operations
+2 -1
internal/api/handlers/community/errors.go
··· 1 1 package community 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "encoding/json" 6 5 "log" 7 6 "net/http" 7 + 8 + "Coves/internal/core/communities" 8 9 ) 9 10 10 11 // XRPCError represents an XRPC error response
+2 -1
internal/api/handlers/community/get.go
··· 1 1 package community 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "encoding/json" 6 5 "net/http" 6 + 7 + "Coves/internal/core/communities" 7 8 ) 8 9 9 10 // GetHandler handles community retrieval
+2 -1
internal/api/handlers/community/list.go
··· 1 1 package community 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "encoding/json" 6 5 "net/http" 7 6 "strconv" 7 + 8 + "Coves/internal/core/communities" 8 9 ) 9 10 10 11 // ListHandler handles listing communities
+2 -1
internal/api/handlers/community/search.go
··· 1 1 package community 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "encoding/json" 6 5 "net/http" 7 6 "strconv" 7 + 8 + "Coves/internal/core/communities" 8 9 ) 9 10 10 11 // SearchHandler handles community search
+3 -2
internal/api/handlers/community/subscribe.go
··· 1 1 package community 2 2 3 3 import ( 4 - "Coves/internal/api/middleware" 5 - "Coves/internal/core/communities" 6 4 "encoding/json" 7 5 "log" 8 6 "net/http" 9 7 "strings" 8 + 9 + "Coves/internal/api/middleware" 10 + "Coves/internal/core/communities" 10 11 ) 11 12 12 13 // SubscribeHandler handles community subscriptions
+3 -2
internal/api/handlers/community/update.go
··· 1 1 package community 2 2 3 3 import ( 4 + "encoding/json" 5 + "net/http" 6 + 4 7 "Coves/internal/api/middleware" 5 8 "Coves/internal/core/communities" 6 - "encoding/json" 7 - "net/http" 8 9 ) 9 10 10 11 // UpdateHandler handles community updates
+2 -1
internal/api/handlers/communityFeed/errors.go
··· 1 1 package communityFeed 2 2 3 3 import ( 4 - "Coves/internal/core/communityFeeds" 5 4 "encoding/json" 6 5 "errors" 7 6 "log" 8 7 "net/http" 8 + 9 + "Coves/internal/core/communityFeeds" 9 10 ) 10 11 11 12 // ErrorResponse represents an XRPC error response
+3 -2
internal/api/handlers/communityFeed/get_community.go
··· 1 1 package communityFeed 2 2 3 3 import ( 4 - "Coves/internal/core/communityFeeds" 5 - "Coves/internal/core/posts" 6 4 "encoding/json" 7 5 "log" 8 6 "net/http" 9 7 "strconv" 8 + 9 + "Coves/internal/core/communityFeeds" 10 + "Coves/internal/core/posts" 10 11 ) 11 12 12 13 // GetCommunityHandler handles community feed retrieval
+2 -1
internal/api/handlers/discover/errors.go
··· 1 1 package discover 2 2 3 3 import ( 4 - "Coves/internal/core/discover" 5 4 "encoding/json" 6 5 "errors" 7 6 "log" 8 7 "net/http" 8 + 9 + "Coves/internal/core/discover" 9 10 ) 10 11 11 12 // XRPCError represents an XRPC error response
+3 -2
internal/api/handlers/discover/get_discover.go
··· 1 1 package discover 2 2 3 3 import ( 4 - "Coves/internal/core/discover" 5 - "Coves/internal/core/posts" 6 4 "encoding/json" 7 5 "log" 8 6 "net/http" 9 7 "strconv" 8 + 9 + "Coves/internal/core/discover" 10 + "Coves/internal/core/posts" 10 11 ) 11 12 12 13 // GetDiscoverHandler handles discover feed retrieval
+3 -2
internal/api/handlers/post/create.go
··· 1 1 package post 2 2 3 3 import ( 4 - "Coves/internal/api/middleware" 5 - "Coves/internal/core/posts" 6 4 "encoding/json" 7 5 "log" 8 6 "net/http" 9 7 "strings" 8 + 9 + "Coves/internal/api/middleware" 10 + "Coves/internal/core/posts" 10 11 ) 11 12 12 13 // CreateHandler handles post creation requests
+3 -2
internal/api/handlers/post/errors.go
··· 1 1 package post 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 - "Coves/internal/core/posts" 6 4 "encoding/json" 7 5 "log" 8 6 "net/http" 7 + 8 + "Coves/internal/core/aggregators" 9 + "Coves/internal/core/posts" 9 10 ) 10 11 11 12 type errorResponse struct {
+2 -1
internal/api/handlers/timeline/errors.go
··· 1 1 package timeline 2 2 3 3 import ( 4 - "Coves/internal/core/timeline" 5 4 "encoding/json" 6 5 "errors" 7 6 "log" 8 7 "net/http" 8 + 9 + "Coves/internal/core/timeline" 9 10 ) 10 11 11 12 // XRPCError represents an XRPC error response
+4 -3
internal/api/handlers/timeline/get_timeline.go
··· 1 1 package timeline 2 2 3 3 import ( 4 - "Coves/internal/api/middleware" 5 - "Coves/internal/core/posts" 6 - "Coves/internal/core/timeline" 7 4 "encoding/json" 8 5 "log" 9 6 "net/http" 10 7 "strconv" 11 8 "strings" 9 + 10 + "Coves/internal/api/middleware" 11 + "Coves/internal/core/posts" 12 + "Coves/internal/core/timeline" 12 13 ) 13 14 14 15 // GetTimelineHandler handles timeline feed retrieval
+2 -1
internal/api/middleware/auth.go
··· 1 1 package middleware 2 2 3 3 import ( 4 - "Coves/internal/atproto/auth" 5 4 "context" 6 5 "log" 7 6 "net/http" 8 7 "strings" 8 + 9 + "Coves/internal/atproto/auth" 9 10 ) 10 11 11 12 // Context keys for storing user information
+2 -1
internal/api/routes/user.go
··· 1 1 package routes 2 2 3 3 import ( 4 - "Coves/internal/core/users" 5 4 "encoding/json" 6 5 "errors" 7 6 "log" 8 7 "net/http" 9 8 "time" 9 + 10 + "Coves/internal/core/users" 10 11 11 12 "github.com/go-chi/chi/v5" 12 13 )
+2 -1
internal/atproto/jetstream/aggregator_consumer.go
··· 1 1 package jetstream 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 4 "context" 6 5 "encoding/json" 7 6 "fmt" 8 7 "log" 9 8 "time" 9 + 10 + "Coves/internal/core/aggregators" 10 11 ) 11 12 12 13 // AggregatorEventConsumer consumes aggregator-related events from Jetstream
+3 -2
internal/atproto/jetstream/comment_consumer.go
··· 1 1 package jetstream 2 2 3 3 import ( 4 - "Coves/internal/atproto/utils" 5 - "Coves/internal/core/comments" 6 4 "context" 7 5 "database/sql" 8 6 "encoding/json" ··· 10 8 "log" 11 9 "strings" 12 10 "time" 11 + 12 + "Coves/internal/atproto/utils" 13 + "Coves/internal/core/comments" 13 14 14 15 "github.com/lib/pq" 15 16 )
+10 -8
internal/atproto/jetstream/community_consumer.go
··· 1 1 package jetstream 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 - "Coves/internal/atproto/utils" 6 - "Coves/internal/core/communities" 7 4 "context" 8 5 "encoding/json" 9 6 "fmt" ··· 11 8 "net/http" 12 9 "strings" 13 10 "time" 11 + 12 + "Coves/internal/atproto/identity" 13 + "Coves/internal/atproto/utils" 14 + "Coves/internal/core/communities" 14 15 15 16 lru "github.com/hashicorp/golang-lru/v2" 16 17 "golang.org/x/net/publicsuffix" ··· 389 390 390 391 // verifyDIDDocument fetches and validates the DID document from .well-known/did.json 391 392 // Implements Bluesky's bidirectional verification model: 392 - // 1. Verify DID document exists at https://domain/.well-known/did.json 393 - // 2. Verify DID document ID matches claimed DID 394 - // 3. Verify DID document claims the handle in alsoKnownAs field 393 + // 1. Verify DID document exists at https://domain/.well-known/did.json 394 + // 2. Verify DID document ID matches claimed DID 395 + // 3. Verify DID document claims the handle in alsoKnownAs field 396 + // 395 397 // Results are cached with TTL and rate-limited to prevent DoS attacks 396 398 func (c *CommunityEventConsumer) verifyDIDDocument(ctx context.Context, did, domain, handle string) error { 397 399 // Skip verification in dev mode ··· 451 453 452 454 // Parse DID document 453 455 var didDoc struct { 454 - ID string `json:"id"` 455 - AlsoKnownAs []string `json:"alsoKnownAs"` 456 + ID string `json:"id"` 457 + AlsoKnownAs []string `json:"alsoKnownAs"` 456 458 } 457 459 if err := json.NewDecoder(resp.Body).Decode(&didDoc); err != nil { 458 460 // Cache the failure
+4 -3
internal/atproto/jetstream/post_consumer.go
··· 1 1 package jetstream 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/core/posts" 6 - "Coves/internal/core/users" 7 4 "context" 8 5 "database/sql" 9 6 "encoding/json" ··· 11 8 "log" 12 9 "strings" 13 10 "time" 11 + 12 + "Coves/internal/core/communities" 13 + "Coves/internal/core/posts" 14 + "Coves/internal/core/users" 14 15 ) 15 16 16 17 // PostEventConsumer consumes post-related events from Jetstream
+3 -2
internal/atproto/jetstream/user_consumer.go
··· 1 1 package jetstream 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 - "Coves/internal/core/users" 6 4 "context" 7 5 "encoding/json" 8 6 "fmt" 9 7 "log" 10 8 "sync" 11 9 "time" 10 + 11 + "Coves/internal/atproto/identity" 12 + "Coves/internal/core/users" 12 13 13 14 "github.com/gorilla/websocket" 14 15 )
+4 -3
internal/atproto/jetstream/vote_consumer.go
··· 1 1 package jetstream 2 2 3 3 import ( 4 - "Coves/internal/atproto/utils" 5 - "Coves/internal/core/users" 6 - "Coves/internal/core/votes" 7 4 "context" 8 5 "database/sql" 9 6 "fmt" 10 7 "log" 11 8 "strings" 12 9 "time" 10 + 11 + "Coves/internal/atproto/utils" 12 + "Coves/internal/core/users" 13 + "Coves/internal/core/votes" 13 14 ) 14 15 15 16 // VoteEventConsumer consumes vote-related events from Jetstream
+2 -1
internal/core/aggregators/service.go
··· 1 1 package aggregators 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "context" 6 5 "encoding/json" 7 6 "fmt" 8 7 "time" 8 + 9 + "Coves/internal/core/communities" 9 10 10 11 "github.com/xeipuuv/gojsonschema" 11 12 )
+2 -1
internal/core/blobs/service.go
··· 1 1 package blobs 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "bytes" 6 5 "context" 7 6 "encoding/json" ··· 10 9 "log" 11 10 "net/http" 12 11 "time" 12 + 13 + "Coves/internal/core/communities" 13 14 ) 14 15 15 16 // Service defines the interface for blob operations
+4 -3
internal/core/comments/comment_service.go
··· 1 1 package comments 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/core/posts" 6 - "Coves/internal/core/users" 7 4 "context" 8 5 "encoding/json" 9 6 "errors" ··· 12 9 "net/url" 13 10 "strings" 14 11 "time" 12 + 13 + "Coves/internal/core/communities" 14 + "Coves/internal/core/posts" 15 + "Coves/internal/core/users" 15 16 ) 16 17 17 18 const (
+4 -3
internal/core/comments/comment_service_test.go
··· 1 1 package comments 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/core/posts" 6 - "Coves/internal/core/users" 7 4 "context" 8 5 "errors" 9 6 "testing" 10 7 "time" 8 + 9 + "Coves/internal/core/communities" 10 + "Coves/internal/core/posts" 11 + "Coves/internal/core/users" 11 12 12 13 "github.com/stretchr/testify/assert" 13 14 )
+2 -1
internal/core/communities/service.go
··· 1 1 package communities 2 2 3 3 import ( 4 - "Coves/internal/atproto/utils" 5 4 "bytes" 6 5 "context" 7 6 "encoding/json" ··· 14 13 "strings" 15 14 "sync" 16 15 "time" 16 + 17 + "Coves/internal/atproto/utils" 17 18 ) 18 19 19 20 // Community handle validation regex (DNS-valid handle: name.community.instance.com)
+2 -1
internal/core/communityFeeds/service.go
··· 1 1 package communityFeeds 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "context" 6 5 "fmt" 6 + 7 + "Coves/internal/core/communities" 7 8 ) 8 9 9 10 type feedService struct {
+2 -1
internal/core/communityFeeds/types.go
··· 1 1 package communityFeeds 2 2 3 3 import ( 4 + "time" 5 + 4 6 "Coves/internal/core/posts" 5 - "time" 6 7 ) 7 8 8 9 // GetCommunityFeedRequest represents input for fetching a community feed
+2 -1
internal/core/discover/types.go
··· 1 1 package discover 2 2 3 3 import ( 4 - "Coves/internal/core/posts" 5 4 "context" 6 5 "errors" 6 + 7 + "Coves/internal/core/posts" 7 8 ) 8 9 9 10 // Repository defines discover data access interface
+6 -5
internal/core/posts/service.go
··· 1 1 package posts 2 2 3 3 import ( 4 - "Coves/internal/api/middleware" 5 - "Coves/internal/core/aggregators" 6 - "Coves/internal/core/blobs" 7 - "Coves/internal/core/communities" 8 - "Coves/internal/core/unfurl" 9 4 "bytes" 10 5 "context" 11 6 "encoding/json" ··· 15 10 "net/http" 16 11 "os" 17 12 "time" 13 + 14 + "Coves/internal/api/middleware" 15 + "Coves/internal/core/aggregators" 16 + "Coves/internal/core/blobs" 17 + "Coves/internal/core/communities" 18 + "Coves/internal/core/unfurl" 18 19 ) 19 20 20 21 type postService struct {
+2 -1
internal/core/timeline/types.go
··· 1 1 package timeline 2 2 3 3 import ( 4 - "Coves/internal/core/posts" 5 4 "context" 6 5 "errors" 7 6 "time" 7 + 8 + "Coves/internal/core/posts" 8 9 ) 9 10 10 11 // Repository defines timeline data access interface
+2 -1
internal/core/users/service.go
··· 1 1 package users 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 4 "bytes" 6 5 "context" 7 6 "encoding/json" ··· 12 11 "regexp" 13 12 "strings" 14 13 "time" 14 + 15 + "Coves/internal/atproto/identity" 15 16 ) 16 17 17 18 // atProto handle validation regex (per official atProto spec: https://atproto.com/specs/handle)
+2 -1
internal/db/postgres/aggregator_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "strings" 9 8 "time" 9 + 10 + "Coves/internal/core/aggregators" 10 11 ) 11 12 12 13 type postgresAggregatorRepo struct {
+2 -1
internal/db/postgres/comment_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/comments" 5 4 "context" 6 5 "database/sql" 7 6 "encoding/base64" 8 7 "fmt" 9 8 "log" 10 9 "strings" 10 + 11 + "Coves/internal/core/comments" 11 12 12 13 "github.com/lib/pq" 13 14 )
+2 -1
internal/db/postgres/community_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "log" 9 8 "strings" 9 + 10 + "Coves/internal/core/communities" 10 11 11 12 "github.com/lib/pq" 12 13 )
+2 -1
internal/db/postgres/community_repo_blocks.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "log" 8 + 9 + "Coves/internal/core/communities" 9 10 ) 10 11 11 12 // BlockCommunity creates a new block record (idempotent)
+2 -1
internal/db/postgres/community_repo_memberships.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "log" 9 8 "strings" 9 + 10 + "Coves/internal/core/communities" 10 11 ) 11 12 12 13 // CreateMembership creates a new membership record
+2 -1
internal/db/postgres/community_repo_subscriptions.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "log" 9 8 "strings" 9 + 10 + "Coves/internal/core/communities" 10 11 ) 11 12 12 13 // Subscribe creates a new subscription record
+2 -1
internal/db/postgres/discover_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/discover" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 7 + 8 + "Coves/internal/core/discover" 8 9 ) 9 10 10 11 type postgresDiscoverRepo struct {
+2 -1
internal/db/postgres/feed_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/communityFeeds" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 7 + 8 + "Coves/internal/core/communityFeeds" 8 9 ) 9 10 10 11 type postgresFeedRepo struct {
+2 -1
internal/db/postgres/feed_repo_base.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/posts" 5 4 "crypto/hmac" 6 5 "crypto/sha256" 7 6 "database/sql" ··· 12 11 "strconv" 13 12 "strings" 14 13 "time" 14 + 15 + "Coves/internal/core/posts" 15 16 ) 16 17 17 18 // feedRepoBase contains shared logic for timeline and discover feed repositories
+2 -1
internal/db/postgres/post_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/posts" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "strings" 8 + 9 + "Coves/internal/core/posts" 9 10 ) 10 11 11 12 type postgresPostRepo struct {
+2 -1
internal/db/postgres/timeline_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/timeline" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 7 + 8 + "Coves/internal/core/timeline" 8 9 ) 9 10 10 11 type postgresTimelineRepo struct {
+2 -1
internal/db/postgres/user_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/users" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "log" 9 8 "strings" 9 + 10 + "Coves/internal/core/users" 10 11 11 12 "github.com/lib/pq" 12 13 )
+2 -1
internal/db/postgres/vote_repo.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/votes" 5 4 "context" 6 5 "database/sql" 7 6 "fmt" 8 7 "strings" 8 + 9 + "Coves/internal/core/votes" 9 10 ) 10 11 11 12 type postgresVoteRepo struct {
+2 -1
internal/db/postgres/vote_repo_test.go
··· 1 1 package postgres 2 2 3 3 import ( 4 - "Coves/internal/core/votes" 5 4 "context" 6 5 "database/sql" 7 6 "os" 8 7 "testing" 9 8 "time" 9 + 10 + "Coves/internal/core/votes" 10 11 11 12 _ "github.com/lib/pq" 12 13 "github.com/pressly/goose/v3"
+5 -4
tests/e2e/error_recovery_test.go
··· 1 1 package e2e 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 - "Coves/internal/atproto/jetstream" 6 - "Coves/internal/core/users" 7 - "Coves/internal/db/postgres" 8 4 "context" 9 5 "database/sql" 10 6 "fmt" ··· 15 11 "sync/atomic" 16 12 "testing" 17 13 "time" 14 + 15 + "Coves/internal/atproto/identity" 16 + "Coves/internal/atproto/jetstream" 17 + "Coves/internal/core/users" 18 + "Coves/internal/db/postgres" 18 19 19 20 _ "github.com/lib/pq" 20 21 "github.com/pressly/goose/v3"
+5 -4
tests/e2e/user_signup_test.go
··· 1 1 package e2e 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 - "Coves/internal/atproto/jetstream" 6 - "Coves/internal/core/users" 7 - "Coves/internal/db/postgres" 8 4 "bytes" 9 5 "context" 10 6 "database/sql" ··· 14 10 "os" 15 11 "testing" 16 12 "time" 13 + 14 + "Coves/internal/atproto/identity" 15 + "Coves/internal/atproto/jetstream" 16 + "Coves/internal/core/users" 17 + "Coves/internal/db/postgres" 17 18 18 19 _ "github.com/lib/pq" 19 20 "github.com/pressly/goose/v3"
+11 -10
tests/integration/aggregator_e2e_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/aggregator" 5 - "Coves/internal/api/handlers/post" 6 - "Coves/internal/api/middleware" 7 - "Coves/internal/atproto/identity" 8 - "Coves/internal/atproto/jetstream" 9 - "Coves/internal/core/aggregators" 10 - "Coves/internal/core/communities" 11 - "Coves/internal/core/posts" 12 - "Coves/internal/core/users" 13 - "Coves/internal/db/postgres" 14 4 "bytes" 15 5 "context" 16 6 "database/sql" ··· 22 12 "strings" 23 13 "testing" 24 14 "time" 15 + 16 + "Coves/internal/api/handlers/aggregator" 17 + "Coves/internal/api/handlers/post" 18 + "Coves/internal/api/middleware" 19 + "Coves/internal/atproto/identity" 20 + "Coves/internal/atproto/jetstream" 21 + "Coves/internal/core/aggregators" 22 + "Coves/internal/core/communities" 23 + "Coves/internal/core/posts" 24 + "Coves/internal/core/users" 25 + "Coves/internal/db/postgres" 25 26 26 27 _ "github.com/lib/pq" 27 28 "github.com/pressly/goose/v3"
+4 -3
tests/integration/aggregator_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/core/aggregators" 5 - "Coves/internal/core/communities" 6 - "Coves/internal/db/postgres" 7 4 "context" 8 5 "encoding/json" 9 6 "fmt" 10 7 "testing" 11 8 "time" 9 + 10 + "Coves/internal/core/aggregators" 11 + "Coves/internal/core/communities" 12 + "Coves/internal/db/postgres" 12 13 ) 13 14 14 15 // TestAggregatorRepository_Create tests basic aggregator creation
+8 -7
tests/integration/blob_upload_e2e_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 - "Coves/internal/atproto/jetstream" 6 - "Coves/internal/core/blobs" 7 - "Coves/internal/core/communities" 8 - "Coves/internal/core/posts" 9 - "Coves/internal/core/users" 10 - "Coves/internal/db/postgres" 11 4 "bytes" 12 5 "context" 13 6 "encoding/json" ··· 21 14 "strings" 22 15 "testing" 23 16 "time" 17 + 18 + "Coves/internal/atproto/identity" 19 + "Coves/internal/atproto/jetstream" 20 + "Coves/internal/core/blobs" 21 + "Coves/internal/core/communities" 22 + "Coves/internal/core/posts" 23 + "Coves/internal/core/users" 24 + "Coves/internal/db/postgres" 24 25 25 26 "github.com/stretchr/testify/assert" 26 27 "github.com/stretchr/testify/require"
+5 -4
tests/integration/block_handle_resolution_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/community" 5 - "Coves/internal/api/middleware" 6 - "Coves/internal/core/communities" 7 - postgresRepo "Coves/internal/db/postgres" 8 4 "bytes" 9 5 "context" 10 6 "encoding/json" ··· 12 8 "net/http" 13 9 "net/http/httptest" 14 10 "testing" 11 + 12 + "Coves/internal/api/handlers/community" 13 + "Coves/internal/api/middleware" 14 + "Coves/internal/core/communities" 15 + postgresRepo "Coves/internal/db/postgres" 15 16 ) 16 17 17 18 // TestBlockHandler_HandleResolution tests that the block handler accepts handles
+4 -3
tests/integration/comment_consumer_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/jetstream" 5 - "Coves/internal/core/comments" 6 - "Coves/internal/db/postgres" 7 4 "context" 8 5 "fmt" 9 6 "testing" 10 7 "time" 8 + 9 + "Coves/internal/atproto/jetstream" 10 + "Coves/internal/core/comments" 11 + "Coves/internal/db/postgres" 11 12 ) 12 13 13 14 func TestCommentConsumer_CreateComment(t *testing.T) {
+4 -3
tests/integration/comment_query_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/jetstream" 5 - "Coves/internal/core/comments" 6 - "Coves/internal/db/postgres" 7 4 "context" 8 5 "database/sql" 9 6 "encoding/json" ··· 13 10 "strings" 14 11 "testing" 15 12 "time" 13 + 14 + "Coves/internal/atproto/jetstream" 15 + "Coves/internal/core/comments" 16 + "Coves/internal/db/postgres" 16 17 17 18 "github.com/stretchr/testify/assert" 18 19 "github.com/stretchr/testify/require"
+5 -4
tests/integration/comment_vote_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 + "context" 5 + "fmt" 6 + "testing" 7 + "time" 8 + 4 9 "Coves/internal/atproto/jetstream" 5 10 "Coves/internal/core/comments" 6 11 "Coves/internal/core/users" 7 12 "Coves/internal/db/postgres" 8 - "context" 9 - "fmt" 10 - "testing" 11 - "time" 12 13 ) 13 14 14 15 // TestCommentVote_CreateAndUpdate tests voting on comments and vote count updates
+3 -2
tests/integration/community_blocking_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/jetstream" 5 - "Coves/internal/core/communities" 6 4 "context" 7 5 "database/sql" 8 6 "fmt" 9 7 "testing" 10 8 "time" 9 + 10 + "Coves/internal/atproto/jetstream" 11 + "Coves/internal/core/communities" 11 12 12 13 postgresRepo "Coves/internal/db/postgres" 13 14 )
+5 -4
tests/integration/community_consumer_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 - "Coves/internal/atproto/jetstream" 6 - "Coves/internal/core/communities" 7 - "Coves/internal/db/postgres" 8 4 "context" 9 5 "errors" 10 6 "fmt" 11 7 "testing" 12 8 "time" 9 + 10 + "Coves/internal/atproto/identity" 11 + "Coves/internal/atproto/jetstream" 12 + "Coves/internal/core/communities" 13 + "Coves/internal/db/postgres" 13 14 ) 14 15 15 16 func TestCommunityConsumer_HandleCommunityProfile(t *testing.T) {
+3 -2
tests/integration/community_credentials_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/db/postgres" 6 4 "context" 7 5 "fmt" 8 6 "testing" 9 7 "time" 8 + 9 + "Coves/internal/core/communities" 10 + "Coves/internal/db/postgres" 10 11 ) 11 12 12 13 // TestCommunityRepository_CredentialPersistence tests that PDS credentials are properly persisted
+3 -2
tests/integration/community_hostedby_security_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/jetstream" 5 - "Coves/internal/db/postgres" 6 4 "context" 7 5 "fmt" 8 6 "net/http" ··· 10 8 "strings" 11 9 "testing" 12 10 "time" 11 + 12 + "Coves/internal/atproto/jetstream" 13 + "Coves/internal/db/postgres" 13 14 ) 14 15 15 16 // TestHostedByVerification_DomainMatching tests that hostedBy domain must match handle domain
+3 -2
tests/integration/community_identifier_resolution_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/db/postgres" 6 4 "context" 7 5 "fmt" 8 6 "os" 9 7 "strings" 10 8 "testing" 11 9 "time" 10 + 11 + "Coves/internal/core/communities" 12 + "Coves/internal/db/postgres" 12 13 13 14 "github.com/stretchr/testify/assert" 14 15 "github.com/stretchr/testify/require"
+3 -2
tests/integration/community_provisioning_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/db/postgres" 6 4 "context" 7 5 "fmt" 8 6 "strings" 9 7 "testing" 10 8 "time" 9 + 10 + "Coves/internal/core/communities" 11 + "Coves/internal/db/postgres" 11 12 ) 12 13 13 14 // TestCommunityRepository_PasswordEncryption verifies P0 fix:
+3 -2
tests/integration/community_repo_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/db/postgres" 6 4 "context" 7 5 "fmt" 8 6 "testing" 9 7 "time" 8 + 9 + "Coves/internal/core/communities" 10 + "Coves/internal/db/postgres" 10 11 ) 11 12 12 13 func TestCommunityRepository_Create(t *testing.T) {
+3 -2
tests/integration/community_service_integration_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/db/postgres" 6 4 "bytes" 7 5 "context" 8 6 "encoding/json" ··· 12 10 "strings" 13 11 "testing" 14 12 "time" 13 + 14 + "Coves/internal/core/communities" 15 + "Coves/internal/db/postgres" 15 16 ) 16 17 17 18 // TestCommunityService_CreateWithRealPDS tests the complete service layer flow
+4 -3
tests/integration/community_v2_validation_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/jetstream" 5 - "Coves/internal/core/communities" 6 - "Coves/internal/db/postgres" 7 4 "context" 8 5 "fmt" 9 6 "testing" 10 7 "time" 8 + 9 + "Coves/internal/atproto/jetstream" 10 + "Coves/internal/core/communities" 11 + "Coves/internal/db/postgres" 11 12 ) 12 13 13 14 // TestCommunityConsumer_V2RKeyValidation tests that only V2 communities (rkey="self") are accepted
+6 -5
tests/integration/concurrent_scenarios_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 + "context" 5 + "fmt" 6 + "sync" 7 + "testing" 8 + "time" 9 + 4 10 "Coves/internal/atproto/jetstream" 5 11 "Coves/internal/core/comments" 6 12 "Coves/internal/core/communities" 7 13 "Coves/internal/core/users" 8 14 "Coves/internal/db/postgres" 9 - "context" 10 - "fmt" 11 - "sync" 12 - "testing" 13 - "time" 14 15 ) 15 16 16 17 // TestConcurrentVoting_MultipleUsersOnSamePost tests race conditions when multiple users
+3 -2
tests/integration/discover_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/discover" 5 - "Coves/internal/db/postgres" 6 4 "context" 7 5 "encoding/json" 8 6 "fmt" ··· 10 8 "net/http/httptest" 11 9 "testing" 12 10 "time" 11 + 12 + "Coves/internal/api/handlers/discover" 13 + "Coves/internal/db/postgres" 13 14 14 15 discoverCore "Coves/internal/core/discover" 15 16
+5 -4
tests/integration/feed_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/communityFeed" 5 - "Coves/internal/core/communities" 6 - "Coves/internal/core/communityFeeds" 7 - "Coves/internal/db/postgres" 8 4 "context" 9 5 "encoding/json" 10 6 "fmt" ··· 12 8 "net/http/httptest" 13 9 "testing" 14 10 "time" 11 + 12 + "Coves/internal/api/handlers/communityFeed" 13 + "Coves/internal/core/communities" 14 + "Coves/internal/core/communityFeeds" 15 + "Coves/internal/db/postgres" 15 16 16 17 "github.com/stretchr/testify/assert" 17 18 "github.com/stretchr/testify/require"
+3 -2
tests/integration/helpers.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/auth" 5 - "Coves/internal/core/users" 6 4 "bytes" 7 5 "context" 8 6 "database/sql" ··· 15 13 "strings" 16 14 "testing" 17 15 "time" 16 + 17 + "Coves/internal/atproto/auth" 18 + "Coves/internal/core/users" 18 19 19 20 "github.com/golang-jwt/jwt/v5" 20 21 )
+2 -1
tests/integration/identity_resolution_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/identity" 5 4 "context" 6 5 "fmt" 7 6 "os" 8 7 "testing" 9 8 "time" 9 + 10 + "Coves/internal/atproto/identity" 10 11 ) 11 12 12 13 // uniqueID generates a unique identifier for test isolation
+4 -3
tests/integration/jetstream_consumer_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 + "context" 5 + "testing" 6 + "time" 7 + 4 8 "Coves/internal/atproto/identity" 5 9 "Coves/internal/atproto/jetstream" 6 10 "Coves/internal/core/users" 7 11 "Coves/internal/db/postgres" 8 - "context" 9 - "testing" 10 - "time" 11 12 ) 12 13 13 14 func TestUserIndexingFromJetstream(t *testing.T) {
+3 -2
tests/integration/jwt_verification_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/auth" 5 - "Coves/internal/api/middleware" 6 4 "fmt" 7 5 "net/http" 8 6 "net/http/httptest" ··· 10 8 "strings" 11 9 "testing" 12 10 "time" 11 + 12 + "Coves/internal/api/middleware" 13 + "Coves/internal/atproto/auth" 13 14 ) 14 15 15 16 // TestJWTSignatureVerification tests end-to-end JWT signature verification
+4 -3
tests/integration/post_consumer_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/jetstream" 5 - "Coves/internal/core/users" 6 - "Coves/internal/db/postgres" 7 4 "context" 8 5 "fmt" 9 6 "testing" 10 7 "time" 8 + 9 + "Coves/internal/atproto/jetstream" 10 + "Coves/internal/core/users" 11 + "Coves/internal/db/postgres" 11 12 ) 12 13 13 14 // TestPostConsumer_CommentCountReconciliation tests that post comment_count
+5 -4
tests/integration/post_creation_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 + "context" 5 + "fmt" 6 + "strings" 7 + "testing" 8 + 4 9 "Coves/internal/api/middleware" 5 10 "Coves/internal/atproto/identity" 6 11 "Coves/internal/core/communities" 7 12 "Coves/internal/core/posts" 8 13 "Coves/internal/core/users" 9 14 "Coves/internal/db/postgres" 10 - "context" 11 - "fmt" 12 - "strings" 13 - "testing" 14 15 15 16 "github.com/stretchr/testify/assert" 16 17 "github.com/stretchr/testify/require"
+9 -8
tests/integration/post_e2e_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/post" 5 - "Coves/internal/api/middleware" 6 - "Coves/internal/atproto/identity" 7 - "Coves/internal/atproto/jetstream" 8 - "Coves/internal/core/communities" 9 - "Coves/internal/core/posts" 10 - "Coves/internal/core/users" 11 - "Coves/internal/db/postgres" 12 4 "bytes" 13 5 "context" 14 6 "database/sql" ··· 21 13 "strings" 22 14 "testing" 23 15 "time" 16 + 17 + "Coves/internal/api/handlers/post" 18 + "Coves/internal/api/middleware" 19 + "Coves/internal/atproto/identity" 20 + "Coves/internal/atproto/jetstream" 21 + "Coves/internal/core/communities" 22 + "Coves/internal/core/posts" 23 + "Coves/internal/core/users" 24 + "Coves/internal/db/postgres" 24 25 25 26 "github.com/gorilla/websocket" 26 27 _ "github.com/lib/pq"
+6 -5
tests/integration/post_handler_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/post" 5 - "Coves/internal/api/middleware" 6 - "Coves/internal/core/communities" 7 - "Coves/internal/core/posts" 8 - "Coves/internal/db/postgres" 9 4 "bytes" 10 5 "encoding/json" 11 6 "net/http" 12 7 "net/http/httptest" 13 8 "strings" 14 9 "testing" 10 + 11 + "Coves/internal/api/handlers/post" 12 + "Coves/internal/api/middleware" 13 + "Coves/internal/core/communities" 14 + "Coves/internal/core/posts" 15 + "Coves/internal/db/postgres" 15 16 16 17 "github.com/stretchr/testify/assert" 17 18 "github.com/stretchr/testify/require"
+6 -5
tests/integration/post_thumb_validation_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/post" 5 - "Coves/internal/api/middleware" 6 - "Coves/internal/core/communities" 7 - "Coves/internal/core/posts" 8 - "Coves/internal/db/postgres" 9 4 "bytes" 10 5 "context" 11 6 "encoding/json" 12 7 "net/http" 13 8 "net/http/httptest" 14 9 "testing" 10 + 11 + "Coves/internal/api/handlers/post" 12 + "Coves/internal/api/middleware" 13 + "Coves/internal/core/communities" 14 + "Coves/internal/core/posts" 15 + "Coves/internal/db/postgres" 15 16 16 17 "github.com/stretchr/testify/assert" 17 18 "github.com/stretchr/testify/require"
+6 -5
tests/integration/post_unfurl_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 + "context" 5 + "encoding/json" 6 + "fmt" 7 + "testing" 8 + "time" 9 + 4 10 "Coves/internal/api/middleware" 5 11 "Coves/internal/atproto/identity" 6 12 "Coves/internal/atproto/jetstream" ··· 9 15 "Coves/internal/core/unfurl" 10 16 "Coves/internal/core/users" 11 17 "Coves/internal/db/postgres" 12 - "context" 13 - "encoding/json" 14 - "fmt" 15 - "testing" 16 - "time" 17 18 18 19 "github.com/stretchr/testify/assert" 19 20 "github.com/stretchr/testify/require"
+3 -2
tests/integration/subscription_indexing_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/atproto/jetstream" 5 - "Coves/internal/core/communities" 6 4 "context" 7 5 "database/sql" 8 6 "fmt" 9 7 "testing" 10 8 "time" 9 + 10 + "Coves/internal/atproto/jetstream" 11 + "Coves/internal/core/communities" 11 12 12 13 postgresRepo "Coves/internal/db/postgres" 13 14 )
+4 -3
tests/integration/timeline_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/handlers/timeline" 5 - "Coves/internal/api/middleware" 6 - "Coves/internal/db/postgres" 7 4 "context" 8 5 "encoding/json" 9 6 "fmt" ··· 11 8 "net/http/httptest" 12 9 "testing" 13 10 "time" 11 + 12 + "Coves/internal/api/handlers/timeline" 13 + "Coves/internal/api/middleware" 14 + "Coves/internal/db/postgres" 14 15 15 16 timelineCore "Coves/internal/core/timeline" 16 17
+3 -2
tests/integration/token_refresh_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 - "Coves/internal/db/postgres" 6 4 "context" 7 5 "encoding/base64" 8 6 "encoding/json" 9 7 "fmt" 10 8 "testing" 11 9 "time" 10 + 11 + "Coves/internal/core/communities" 12 + "Coves/internal/db/postgres" 12 13 ) 13 14 14 15 // TestTokenRefresh_ExpirationDetection tests the NeedsRefresh function with various token states
+5 -4
tests/integration/user_test.go
··· 1 1 package integration 2 2 3 3 import ( 4 - "Coves/internal/api/routes" 5 - "Coves/internal/atproto/identity" 6 - "Coves/internal/core/users" 7 - "Coves/internal/db/postgres" 8 4 "context" 9 5 "database/sql" 10 6 "encoding/json" ··· 14 10 "os" 15 11 "strings" 16 12 "testing" 13 + 14 + "Coves/internal/api/routes" 15 + "Coves/internal/atproto/identity" 16 + "Coves/internal/core/users" 17 + "Coves/internal/db/postgres" 17 18 18 19 "github.com/go-chi/chi/v5" 19 20 _ "github.com/lib/pq"
+2 -1
tests/unit/community_service_test.go
··· 1 1 package unit 2 2 3 3 import ( 4 - "Coves/internal/core/communities" 5 4 "context" 6 5 "fmt" 7 6 "net/http" ··· 10 9 "sync/atomic" 11 10 "testing" 12 11 "time" 12 + 13 + "Coves/internal/core/communities" 13 14 ) 14 15 15 16 // mockCommunityRepo is a minimal mock for testing service layer