code
Clone this repository
https://tangled.org/bretton.dev/coves
git@knot.bretton.dev:bretton.dev/coves
For self-hosted knots, clone URLs may differ based on your setup.
- Run gofumpt -l -w on all Go files
- Fix import statement formatting (blank lines between groups)
- Auto-fix via make lint-fix
- All linter checks now pass
No functional changes, formatting only
- Add cursorSecret parameter to all NewCommunityFeedRepository calls
- Use 'test-cursor-secret' for test environments
- Add assertions to verify community handle is present in responses
- All 10 feed integration tests pass with HMAC-signed cursors
- Capture community.Handle when fetching community data
- Set Handle field in CommunityRef struct
- Improve error handling for missing communities:
- Log as ERROR (not warning) for data integrity issues
- Use DID as fallback for handle/name to prevent API breakage
- Surfaces orphaned post issues in logs while maintaining resilience
Fixes: Community handle field empty in post views from comment service
- Update NewCommunityFeedRepository to accept cursorSecret parameter
- Enables HMAC-signed cursors for security
- Consistent with timeline and discover feed repos
- Prevents cursor tampering and pagination attacks
- Update SELECT clauses to include c.handle as community_handle
- Update scanFeedPost to scan and populate handle field
- Changes apply to:
- Community feed (feed_repo.go)
- Timeline feed (timeline_repo.go)
- Discover feed (discover_repo.go)
- Shared base scanner (feed_repo_base.go)
All feed endpoints now return community handles in responses
- Update communityRef lexicon definition to include handle field
- Add Handle field to CommunityRef struct
- Follows atProto pattern of including both DID and handle
- Consistent with authorView which requires both fields
Fixes: Backend missing community handle in feed responses
Applied gofumpt strict formatting across entire codebase for consistency.
Changes:
- Import statement formatting (stdlib, external, internal order)
- Blank line grouping in imports
- Fix errcheck issue in user_repo.go (properly check rows.Close() error)
- Add log import for error logging
All tests pass after formatting changes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>